diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-05-13 00:38:42 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-05-13 00:38:42 +0000 |
commit | 3d717fb381ffaec49a6457badd72b5095a60f1f6 (patch) | |
tree | 1918c6a6ecdc76404fb65b66ea42f5c40b8f9a7a /LedgerSMB/AA.pm | |
parent | 063d52183edfcd6d2a766bd6c9de0642d1731c13 (diff) |
Correcting Customer/vendor name not showing up in certain cases
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2140 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/AA.pm')
-rw-r--r-- | LedgerSMB/AA.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm index 997d893b..ce8679a7 100644 --- a/LedgerSMB/AA.pm +++ b/LedgerSMB/AA.pm @@ -308,17 +308,18 @@ sub post_transaction { # AR/AP Transaction. # ~A $query = qq| - INSERT INTO $table (invnumber, person_id) - VALUES (?, (select p.id from person p, entity e, users u + INSERT INTO $table (invnumber, person_id, + entity_credit_account) + VALUES (?, (select e.id from person p, entity e, users u where u.username = ? AND e.id = u.entity_id - AND p.entity_id = e.id ))|; + AND p.entity_id = e.id ), ?)|; # the second param is undef, as the DBI api expects a hashref of # attributes to pass to $dbh->prepare. This is not used here. # ~A - $dbh->do($query,undef,$uid,$form->{login}) || $form->dberror($query); + $dbh->do($query,undef,$uid,$form->{login}, $form->{"$form->{vc}_id"}) || $form->dberror($query); $query = qq| SELECT id FROM $table @@ -337,7 +338,6 @@ sub post_transaction { SET invnumber = ?, ordnumber = ?, transdate = ?, - entity_credit_account = ?, taxincluded = ?, amount = ?, duedate = ?, @@ -350,10 +350,10 @@ sub post_transaction { ponumber = ? WHERE id = ? |; - + my @queryargs = ( $form->{invnumber}, $form->{ordnumber}, - $form->{transdate}, $form->{"$form->{vc}_id"}, + $form->{transdate}, $form->{taxincluded}, $invamount, $form->{duedate}, $paid, $datepaid, $invnetamount, |