summaryrefslogtreecommitdiff
path: root/scripts/customer.pl
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-21 05:42:22 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-21 05:42:22 +0000
commiteb7e5f65f488f890c1d9fb6d56bed8a40fe8a595 (patch)
treeca581deabbbae5cc59c7df22b9ed77c095e8fccb /scripts/customer.pl
parentff6f935be468458483306b06a827ccc82564c496 (diff)
More Customer Fixes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1885 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts/customer.pl')
-rw-r--r--scripts/customer.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/customer.pl b/scripts/customer.pl
index 27e3d4d0..bef642ec 100644
--- a/scripts/customer.pl
+++ b/scripts/customer.pl
@@ -56,6 +56,28 @@ sub get {
}
+
+sub add_location {
+ my ($request) = @_;
+ my $customer = LedgerSMB::DBObject::Customer->new({base => $request, copy => 'all'});
+ $customer->set( entity_class=> '2' );
+ $customer->save_location();
+ $customer->get();
+
+
+ $customer->get_metadata();
+
+ my $template = LedgerSMB::Template->new(
+ user => $user,
+ template => 'customer',
+ path => 'UI/Customer',
+ locale => $request->{_locale},
+ format => 'HTML');
+ $request->{script} = 'Customer/customer';
+ $template->render($customer);
+
+}
+
=pod
=over