[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6277] addons/1.3/wxPOS/WXPOS
- Subject: SF.net SVN: ledger-smb:[6277] addons/1.3/wxPOS/WXPOS
- From: ..hidden..
- Date: Mon, 11 Nov 2013 07:50:55 +0000
Revision: 6277
http://sourceforge.net/p/ledger-smb/code/6277
Author: einhverfr
Date: 2013-11-11 07:50:54 +0000 (Mon, 11 Nov 2013)
Log Message:
-----------
Handling bash invoices and better handling of parts search
Modified Paths:
--------------
addons/1.3/wxPOS/WXPOS/Invoice.pm
addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm
addons/1.3/wxPOS/WXPOS/UI/AR.pm
Modified: addons/1.3/wxPOS/WXPOS/Invoice.pm
===================================================================
--- addons/1.3/wxPOS/WXPOS/Invoice.pm 2013-11-09 16:25:11 UTC (rev 6276)
+++ addons/1.3/wxPOS/WXPOS/Invoice.pm 2013-11-11 07:50:54 UTC (rev 6277)
@@ -236,6 +236,7 @@
sub post {
my ($self) = @_;
my $dbh = $self->_get_dbh;
+ $dbh->{AutoCommit} = 0;
my $sfx;
my $invnumber;
my $invseq;
@@ -245,7 +246,6 @@
} elsif ('2' eq $self->entity_class){
$sfx = 'ar';
}
- $dbh->begin_work;
my ($ref) = $self->call_dbmethod(funcname => "start_$sfx");
my ($id) = values (%$ref);
$self->id($id);
@@ -261,10 +261,14 @@
foreach my $pmt (@{$self->payments}){
$pmt->{"${sfx}_accno"} = $WXPOS::Sysconfig::Accounts->{$sfx};
$pmt->{cash_accno} = $WXPOS::Sysconfig::Accounts->{cash};
+ die $WXPOS::Sysconfig::Accounts->{$sfx} . ':' .
+ $WXPOS::Sysconfig::Accounts->{cash};
+
$self->call_dbmethod(funcname => "add_payment_$sfx", args => $pmt);
}
$self->call_dbmethod(funcname => "finalize_$sfx");
$dbh->commit;
+ $dbh->{AutoCommit} = 1;
}
=head2 print($printer, $format)
Modified: addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm
===================================================================
--- addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm 2013-11-09 16:25:11 UTC (rev 6276)
+++ addons/1.3/wxPOS/WXPOS/UI/AR/Pay.pm 2013-11-11 07:50:54 UTC (rev 6277)
@@ -195,6 +195,10 @@
# Change
my $amounts = $self->get_amounts();
+ if (!$amounts->{paid} and $amounts->{total}){
+ return undef;
+ }
+ $amounts->{paid} ||=0;
if ($amounts->{total} < $amounts->{paid}){
push @$payments, {
amount => $amounts->{total} - $amounts->{paid},
Modified: addons/1.3/wxPOS/WXPOS/UI/AR.pm
===================================================================
--- addons/1.3/wxPOS/WXPOS/UI/AR.pm 2013-11-09 16:25:11 UTC (rev 6276)
+++ addons/1.3/wxPOS/WXPOS/UI/AR.pm 2013-11-11 07:50:54 UTC (rev 6277)
@@ -158,6 +158,7 @@
$self->{parts_list} = undef;
$self->{parts_list} = Wx::ComboBox->new($self->{tab}, -1, '', [510, 120], [280, 24], [''], wxCB_READONLY);
}
+ $self->_getPartsNumber;
return $self->{parts_list};
}
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