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

SF.net SVN: ledger-smb:[5882] branches/1.3/scripts/payment.pl



Revision: 5882
          http://sourceforge.net/p/ledger-smb/code/5882
Author:   einhverfr
Date:     2013-05-30 11:05:22 +0000 (Thu, 30 May 2013)
Log Message:
-----------
Fixing 'NULL' vs undef in use overpayment

Modified Paths:
--------------
    branches/1.3/scripts/payment.pl

Modified: branches/1.3/scripts/payment.pl
===================================================================
--- branches/1.3/scripts/payment.pl	2013-05-30 10:59:19 UTC (rev 5881)
+++ branches/1.3/scripts/payment.pl	2013-05-30 11:05:22 UTC (rev 5882)
@@ -1884,8 +1884,8 @@
         push @{$entity_list{"$entity_id"}->{"array_cash_account_id"}}, $entity_list{"$entity_id"}->{"vc_discount_accno_$count"};
         push @{$entity_list{"$entity_id"}->{"array_source"}}, $locale->text('Applied discount by an overpayment');
 	push @{$entity_list{"$entity_id"}->{"array_transaction_id"}}, $entity_list{"$entity_id"}->{"invoice_id_$count"};
-	push @{$entity_list{"$entity_id"}->{"array_memo"}}, 'NULL';
-	push @{$entity_list{"$entity_id"}->{"ovp_payment_id"}}, 'NULL';
+	push @{$entity_list{"$entity_id"}->{"array_memo"}}, undef;
+	push @{$entity_list{"$entity_id"}->{"ovp_payment_id"}}, undef;
     }
 
     #this is the amount of the present invoice that will be paid from the $ovp_chart_id accno  
@@ -1907,7 +1907,7 @@
         push @{$entity_list{"$entity_id"}->{"array_cash_account_id"}}, $ovp_chart_id;
         push @{$entity_list{"$entity_id"}->{"array_source"}}, $locale->text('use of an overpayment');
         push @{$entity_list{"$entity_id"}->{"array_transaction_id"}}, $entity_list{"$entity_id"}->{"invoice_id_$count"};
-        push @{$entity_list{"$entity_id"}->{"array_memo"}}, 'NULL';
+        push @{$entity_list{"$entity_id"}->{"array_memo"}}, undef;
         push @{$entity_list{"$entity_id"}->{"ovp_payment_id"}}, @{$entity_unused_ovp{"$ovp_chart_id"}->{"unused_overpayment"}}[$unused_ovp_index]->{"payment_id"};
         
         $tmp_ovp_amount = 0;
@@ -1924,7 +1924,7 @@
         push @{$entity_list{"$entity_id"}->{"array_cash_account_id"}}, $ovp_chart_id;
         push @{$entity_list{"$entity_id"}->{"array_source"}}, $locale->text('use of an overpayment');
         push @{$entity_list{"$entity_id"}->{"array_transaction_id"}}, $entity_list{"$entity_id"}->{"invoice_id_$count"};
-        push @{$entity_list{"$entity_id"}->{"array_memo"}}, 'NULL';
+        push @{$entity_list{"$entity_id"}->{"array_memo"}}, undef;
         push @{$entity_list{"$entity_id"}->{"ovp_payment_id"}}, @{$entity_unused_ovp{"$ovp_chart_id"}->{"unused_overpayment"}}[$unused_ovp_index]->{"payment_id"};
         
         $unused_ovp_index = $entity_unused_ovp{"$ovp_chart_id"}->{"unused_ovp_index"}++;
@@ -1937,6 +1937,7 @@
     #call the sql payment_post method  
     $entity_list{"$entity_id"} = LedgerSMB::DBObject::Payment->new({'base' => $request});
     $entity_list{"$entity_id"}->{"entity_credit_id"} = $entity_id;
+
     
     # LETS GET THE DEPARTMENT INFO
     # ******************************************, Falta implementarlo!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1961,8 +1962,8 @@
         push @{$entity_list{"$entity_id"}->{"array_cash_account_id"}}, $entity_list{"$entity_id"}->{"vc_discount_accno_$count"};
         push @{$entity_list{"$entity_id"}->{"array_source"}}, $locale->text('Applied discount by an overpayment');
 	push @{$entity_list{"$entity_id"}->{"array_transaction_id"}}, $entity_list{"$entity_id"}->{"invoice_id_$count"};
-	push @{$entity_list{"$entity_id"}->{"array_memo"}}, 'NULL';
-	push @{$entity_list{"$entity_id"}->{"ovp_payment_id"}}, 'NULL';
+	push @{$entity_list{"$entity_id"}->{"array_memo"}}, undef;
+	push @{$entity_list{"$entity_id"}->{"ovp_payment_id"}}, undef;
 
     }
   
@@ -1978,7 +1979,7 @@
         push @{$entity_list{"$entity_id"}->{"array_cash_account_id"}}, $ovp_chart_id;
         push @{$entity_list{"$entity_id"}->{"array_source"}}, $locale->text('use of an overpayment');
         push @{$entity_list{"$entity_id"}->{"array_transaction_id"}}, $entity_list{"$entity_id"}->{"invoice_id_$count"};
-        push @{$entity_list{"$entity_id"}->{"array_memo"}}, 'NULL';
+        push @{$entity_list{"$entity_id"}->{"array_memo"}}, undef;
         push @{$entity_list{"$entity_id"}->{"ovp_payment_id"}}, @{$entity_unused_ovp{"$ovp_chart_id"}->{"unused_overpayment"}}[$unused_ovp_index]->{"payment_id"};
         
         $tmp_ovp_amount = 0;
@@ -1995,7 +1996,7 @@
         push @{$entity_list{"$entity_id"}->{"array_cash_account_id"}}, $ovp_chart_id;
         push @{$entity_list{"$entity_id"}->{"array_source"}}, $locale->text('use of an overpayment');
         push @{$entity_list{"$entity_id"}->{"array_transaction_id"}}, $entity_list{"$entity_id"}->{"invoice_id_$count"};
-        push @{$entity_list{"$entity_id"}->{"array_memo"}}, 'NULL';
+        push @{$entity_list{"$entity_id"}->{"array_memo"}}, undef;
         push @{$entity_list{"$entity_id"}->{"ovp_payment_id"}}, @{$entity_unused_ovp{"$ovp_chart_id"}->{"unused_overpayment"}}[$unused_ovp_index]->{"payment_id"};
 
         $unused_ovp_index = $entity_unused_ovp{"$ovp_chart_id"}->{"unused_ovp_index"}++;

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