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

SF.net SVN: ledger-smb:[6264] addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm



Revision: 6264
          http://sourceforge.net/p/ledger-smb/code/6264
Author:   einhverfr
Date:     2013-11-08 11:33:51 +0000 (Fri, 08 Nov 2013)
Log Message:
-----------
Payment tracking and change counting now working.

Modified Paths:
--------------
    addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm

Modified: addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm
===================================================================
--- addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm	2013-11-08 11:30:13 UTC (rev 6263)
+++ addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm	2013-11-08 11:33:51 UTC (rev 6264)
@@ -101,26 +101,26 @@
    my $type = $self->{memo}->GetValue();
    my $source= $self->{source}->GetValue();
    my $paid = $self->{total_paid}->GetLabel();
-   my $owing = $self->{owing}->GetLabel();
+   my $owing = $self->{oweing}->GetLabel();
    my $total = $self->{total}->GetLabel();
 
    # Update labels
+   $paid ||= 0;
    $paid += $amount;
    $self->{total_paid}->SetLabel($paid);
    $owing = $total - $paid;
    if ($owing < 0) {
-       $self->{owing_label}->SetLabel('Change');
-       $self->{owing}->SetLabel($owing * -1);
+       $self->{oweing_label}->SetLabel('Change');
+       $self->{oweing}->SetLabel($owing * -1);
    } else {
-       $self->{owing_label}->SetLabel('Owing');
-       $self->{owing}->SetLabel($owing);
+       $self->{oweing_label}->SetLabel('Oweing');
+       $self->{oweing}->SetLabel($owing);
    }
 
    # update list;
-   my $item = $self->{list}->InsertStringItem($num, $num);
-   $self->{list}->SetItem($item, 1, $amount);
-   $self->{list}->SetItem($item, 2, $type);
-   $self->{list}->SetItem($item, 3, $source);
+   my $item = $self->{list}->InsertStringItem($num, $amount);
+   $self->{list}->SetItem($item, 1, $type);
+   $self->{list}->SetItem($item, 2, $source);
 }
 
 sub _Cancel{

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


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits