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

SF.net SVN: ledger-smb:[5077] trunk/LedgerSMB/Scripts/payment.pm



Revision: 5077
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5077&view=rev
Author:   einhverfr
Date:     2012-08-01 09:52:12 +0000 (Wed, 01 Aug 2012)
Log Message:
-----------
A few comments to clarify account classes in payments

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

Modified: trunk/LedgerSMB/Scripts/payment.pm
===================================================================
--- trunk/LedgerSMB/Scripts/payment.pm	2012-08-01 09:42:23 UTC (rev 5076)
+++ trunk/LedgerSMB/Scripts/payment.pm	2012-08-01 09:52:12 UTC (rev 5077)
@@ -177,7 +177,7 @@
                  }
              }
              # If vendor, this is debit-normal so multiply by -1
-             if ($request->{account_class} == 1){
+             if ($request->{account_class} == 1){ # vendor
                  $ref->{amount} *= -1;
               }
               if ($ref->{amount} < 0) {
@@ -202,7 +202,7 @@
        source    => $request->{_locale}->text('Total'),
        amount    => $total,
     };
-    if ($request->{account_class} == 1){
+    if ($request->{account_class} == 1){ # vendor
        $ref->{amount} *= -1;
     } 
 
@@ -967,7 +967,7 @@
  #Now its time to build the link to the invoice :)
  my $uri_module;
  #TODO move following code to sub getModuleForUri() ?
- if($Payment->{account_class} == 1)
+ if($Payment->{account_class} == 1) # 1 is vendor
  {
   if($array_options[$ref]->{invoice})
   {
@@ -978,7 +978,7 @@
    $uri_module='ap';
   }
  }#account_class 1
- elsif($Payment->{account_class} == 2)
+ elsif($Payment->{account_class} == 2) # 2 is customer
  {
   if($array_options[$ref]->{invoice})
   {

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