summaryrefslogtreecommitdiff
path: root/scripts/vendor.pl
blob: 45a46cb6b9e6cb36a0335e5255b005fc28630feb (plain)
  1. #!/usr/bin/perl
  2. =pod
  3. =head1 NAME
  4. LedgerSMB::Scripts::vendor - LedgerSMB class defining the Controller
  5. functions, template instantiation and rendering for vendor editing and display.
  6. =head1 SYOPSIS
  7. This module is the UI controller for the vendor DB access; it provides the
  8. View interface, as well as defines the Save vendor.
  9. Save vendor will update or create as needed.
  10. =head1 METHODS
  11. =cut
  12. package LedgerSMB::Scripts::vendor;
  13. use LedgerSMB::DBObject::Vendor;
  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} = 1;
  19. return 1;
  20. }
  21. sub new_company {
  22. my ($null, $request) = @_;
  23. return LedgerSMB::DBObject::Vendor->new(base=> $request, copy => 'all');
  24. }
  25. eval { do "scripts/custom/vendor.pl"};
  26. 1;