summaryrefslogtreecommitdiff
path: root/LedgerSMB/DBObject
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-19 17:25:47 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-19 17:25:47 +0000
commit5b20c0d8b91b5bc7c6cee549eff6c057aa210d44 (patch)
tree54a57a8c5f133f77292e5820ff061e2ec7172464 /LedgerSMB/DBObject
parent5f1f416312306be454a74536e036177dc1ec8f4a (diff)
More batch enhancements
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1982 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/DBObject')
-rw-r--r--LedgerSMB/DBObject/Payment.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/LedgerSMB/DBObject/Payment.pm b/LedgerSMB/DBObject/Payment.pm
index f4382a28..b35bb2d8 100644
--- a/LedgerSMB/DBObject/Payment.pm
+++ b/LedgerSMB/DBObject/Payment.pm
@@ -366,14 +366,19 @@ sub get_payment_detail_data {
if ($source_src) {
$source_inc = $source_src;
} else {
- $source_inc = $0;
+ $source_inc = 0;
}
}
+ my $source_length = length($source_inc);
+
@{$self->{contact_invoices}} = $self->exec_method(
funcname => 'payment_get_all_contact_invoices');
for my $inv (@{$self->{contact_invoices}}){
if (defined $self->{source_start}){
my $source = $self->{source_start};
+ if (length($source_inc) < $source_length){
+ $source_inc = sprintf('%0*s', $source_length, $source_inc);
+ }
$source =~ s/$source_src(\D*)$/$source_inc$1/;
++ $source_inc;
$inv->{source} = $source;