[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5536] trunk/LedgerSMB/Scripts/inventory.pm



Revision: 5536
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5536&view=rev
Author:   einhverfr
Date:     2013-01-11 06:54:57 +0000 (Fri, 11 Jan 2013)
Log Message:
-----------
Inventory adjustment forms and scripts reviewed

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/inventory.pm

Modified: trunk/LedgerSMB/Scripts/inventory.pm
===================================================================
--- trunk/LedgerSMB/Scripts/inventory.pm	2013-01-10 14:17:57 UTC (rev 5535)
+++ trunk/LedgerSMB/Scripts/inventory.pm	2013-01-11 06:54:57 UTC (rev 5536)
@@ -15,10 +15,11 @@
 =head1 METHODS
 
 =cut
-package LedgerSMB::Scripts::customer;
+package LedgerSMB::Scripts::inventory;
 
 use LedgerSMB::Template;
-use LedgerSMB::DBObject::Customer;
+use LedgerSMB::Inventory::Adjust.pm
+use LedgerSMB::Inventory::Adjust_line.pm
 
 #require 'lsmb-request.pl';
 
@@ -56,7 +57,6 @@
 
 sub enter_adjust {
     my ($request) = @_;
-    my $adjustment = LedgerSMB::DBObject::Inventory->new(base => $request);
     my $template = LedgerSMB::Template->new(
 	user => $request->{_user}, 
     	template => 'adjustment_entry', 
@@ -64,7 +64,7 @@
 	path => 'UI/inventory',
         format => 'HTML'
     );
-    $template->render($adjustment);
+    $template->render($request);
 }
 
 
@@ -82,7 +82,7 @@
 
 sub adjustment_next {
     my ($request) = @_;
-    my $adjustment = LedgerSMB::DBObject::Inventory->new(base => $request);
+    my $adjustment = LedgerSMB::Inventory::Adjust->new(base => $request);
     for my $i (1 .. $adjustment->{rowcount}){
         if ($adjustment->{"row_$i"} eq "new"){
             my $item = $adjustment->retrieve_item_at_date(
@@ -111,7 +111,7 @@
 
 sub adjustment_save {
     my ($request) = @_;
-    my $adjustment = LedgerSMB::DBObject::Inventory->new(base => $request);
+    my $adjustment = LedgerSMB::Inventory::Adjust->new(base => $request);
     $adjustment->save;
     begin_adjust($request);
 } 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.