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

SF.net SVN: ledger-smb:[5163] branches/1.3



Revision: 5163
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5163&view=rev
Author:   einhverfr
Date:     2012-10-16 09:39:27 +0000 (Tue, 16 Oct 2012)
Log Message:
-----------
Correcting invoice date not printing on payments

Modified Paths:
--------------
    branches/1.3/LedgerSMB/DBObject/Payment.pm
    branches/1.3/UI/payments/payment2.html
    branches/1.3/UI/payments/payments_detail.html
    branches/1.3/scripts/payment.pl
    branches/1.3/templates/demo/check_base.tex

Modified: branches/1.3/LedgerSMB/DBObject/Payment.pm
===================================================================
--- branches/1.3/LedgerSMB/DBObject/Payment.pm	2012-10-15 11:28:09 UTC (rev 5162)
+++ branches/1.3/LedgerSMB/DBObject/Payment.pm	2012-10-16 09:39:27 UTC (rev 5163)
@@ -772,7 +772,10 @@
 my ($self) = @_;
 @{$self->{header_info}} = $self->exec_method(funcname => 'payment_gather_header_info');
 @{$self->{line_info}}   = $self->exec_method(funcname => 'payment_gather_line_info');
+for my $row(@{$self->{line_info}}){
+    $row->{invoice_date} = $row->{trans_date};
 }
+}
 
 =item get_open_overpayment_entities 
 

Modified: branches/1.3/UI/payments/payment2.html
===================================================================
--- branches/1.3/UI/payments/payment2.html	2012-10-15 11:28:09 UTC (rev 5162)
+++ branches/1.3/UI/payments/payment2.html	2012-10-16 09:39:27 UTC (rev 5163)
@@ -148,6 +148,8 @@
         <input type="hidden" value="<?lsmb row.invoice.id ?>" />                 </td>
     <?lsmb # we can use an href to link this invoice number to the invoice ?>
     <td><?lsmb row.invoice_date ?></td>
+    <input type="hidden" name="<?lsmb "invoice_date_$row.invoice.id" ?>" 
+          value="<?lsmb row.invoice_date ?>" />
     <td><?lsmb row.amount ?></td>
     <td><?lsmb row.paid ?></td>
     <td><?lsmb row.discount ?></td>

Modified: branches/1.3/UI/payments/payments_detail.html
===================================================================
--- branches/1.3/UI/payments/payments_detail.html	2012-10-15 11:28:09 UTC (rev 5162)
+++ branches/1.3/UI/payments/payments_detail.html	2012-10-16 09:39:27 UTC (rev 5163)
@@ -301,7 +301,12 @@
 		<?lsmb IF i.7 ?>
 		<?lsmb icount = icount + 1 ?>
 		<tr>
-			<td class="invoice_date_list">&nbsp;<?lsmb i.2 ?></td>
+			<td class="invoice_date_list">&nbsp;<?lsmb i.2 ?>
+                        <input type = "hidden"
+                               name = "<?lsmb "invoice_date_$i.0" ?>"
+                              value = "<?lsmb i.2 ?>"
+                        />
+                        </td>
 			<td class="invoice_list">&nbsp;<?lsmb i.1 ?></td>
                         <input
                                type = "hidden"

Modified: branches/1.3/scripts/payment.pl
===================================================================
--- branches/1.3/scripts/payment.pl	2012-10-15 11:28:09 UTC (rev 5162)
+++ branches/1.3/scripts/payment.pl	2012-10-16 09:39:27 UTC (rev 5163)
@@ -498,7 +498,7 @@
             for my $inv (1 .. $payment->{"invoice_count_$id"}){
                 my $invhash = {};
                 my $inv_id = $payment->{"invoice_${id}_$inv"};
-                for (qw(invnumber due)){
+                for (qw(invnumber due invoice_date)){
                     $invhash->{$_} = $payment->{"${_}_$inv_id"};
                 }
                 if ($payment->{"paid_$id"} eq 'some'){

Modified: branches/1.3/templates/demo/check_base.tex
===================================================================
--- branches/1.3/templates/demo/check_base.tex	2012-10-15 11:28:09 UTC (rev 5162)
+++ branches/1.3/templates/demo/check_base.tex	2012-10-16 09:39:27 UTC (rev 5163)
@@ -52,7 +52,7 @@
 \textbf{<?lsmb text('Invoice #') ?>} & \textbf{<?lsmb text('Invoice Date') ?>}
   & \textbf{<?lsmb text('Amount Due') ?>} & \textbf{<?lsmb text('Applied') ?>} \\
 <?lsmb FOR inv = invoices ?>
-<?lsmb inv.invnumber ?> & <?lsmb inv.invdate ?> \dotfill
+<?lsmb inv.invnumber ?> & <?lsmb inv.invoice_date ?> \dotfill
   & <?lsmb inv.due ?> & <?lsmb inv.paid ?> \\
 <?lsmb END # FOREACH inv ?>
 \end{tabularx}

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