diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-16 00:03:37 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-16 00:03:37 +0000 |
commit | dde3b204b288b72ce848bdc72762acab5399fef0 (patch) | |
tree | 5a6dbe5abee37379bf46cda9747240fa3c32ab5a /bin/is.pl | |
parent | 666211039ec5b79bc612f48235afee8887f49575 (diff) |
Credit/Debit notes now work, credit/debit invoices still need some testing
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1399 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin/is.pl')
-rw-r--r-- | bin/is.pl | 25 |
1 files changed, 18 insertions, 7 deletions
@@ -55,9 +55,14 @@ require "bin/io.pl"; # end of main sub add { - - $form->{title} = $locale->text('Add Sales Invoice'); - + if ($form->{type} eq 'credit_invoice'){ + $form->{title} = $locale->text('Add Credit Invoice'); + $form->{subtype} = 'credit_invoice'; + $form->{reverse} = 1; + } else { + $form->{title} = $locale->text('Add Sales Invoice'); + $form->{reverse} = 0; + } $form->{callback} = "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&path=$form->{path}&sessionid=$form->{sessionid}" unless $form->{callback}; @@ -70,8 +75,12 @@ sub add { sub edit { - $form->{title} = $locale->text('Edit Sales Invoice'); - + if ($form->{reverse}) { + $form->{title} = $locale->text('Add Credit Invoice'); + $form->{subtype} = 'credit_invoice'; + } else { + $form->{title} = $locale->text('Add Sales Invoice'); + } &invoice_links; &prepare_invoice; &display_form; @@ -402,7 +411,9 @@ sub form_header { |; $form->hide_form( - qw(id type media format printed emailed queued title vc terms discount creditlimit creditremaining tradediscount business closedto locked shipped oldtransdate recurring) + qw(id type media format printed emailed queued title vc terms discount + creditlimit creditremaining tradediscount business closedto locked + shipped oldtransdate recurring reverse batch_id subtype) ); print qq| @@ -1198,4 +1209,4 @@ sub on_hold { #&invoice_links(); # is that it? &edit(); # it was already IN edit for this to be reached. } -}
\ No newline at end of file +} |