summaryrefslogtreecommitdiff
path: root/scripts/customer.pl
blob: 0bf05b8f79ec310c1dbd2c47483bd10791a813aa (plain)
  1. #!/usr/bin/perl
  2. =pod
  3. =head1 NAME
  4. LedgerSMB::Scripts::customer - LedgerSMB class defining the Controller
  5. functions, template instantiation and rendering for customer editing and display.
  6. =head1 SYOPSIS
  7. This module is the UI controller for the customer DB access; it provides the
  8. View interface, as well as defines the Save customer.
  9. Save customer will update or create as needed.
  10. =head1 METHODS
  11. =cut
  12. package LedgerSMB::Scripts::customer;
  13. use LedgerSMB::DBObject::Customer;
  14. use base qw(LedgerSMB::ScriptLib::Company);
  15. #require 'lsmb-request.pl';
  16. sub set_entity_class {
  17. my ($null, $request) = @_;
  18. $request->{entity_class} = 2;
  19. return 1;
  20. }
  21. sub new_company {
  22. my ($null, $request) = @_;
  23. return LedgerSMB::DBObject::Customer->new(base=> $request, copy => 'all');
  24. }
  25. 1;