diff options
-rwxr-xr-x | LedgerSMB/AA.pm | 1 | ||||
-rwxr-xr-x | LedgerSMB/Form.pm | 3 | ||||
-rwxr-xr-x | LedgerSMB/IS.pm | 2 | ||||
-rwxr-xr-x | bin/aa.pl | 1 | ||||
-rwxr-xr-x | bin/pos.pl | 8 |
5 files changed, 10 insertions, 5 deletions
diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm index b4311eae..dc6f6279 100755 --- a/LedgerSMB/AA.pm +++ b/LedgerSMB/AA.pm @@ -837,7 +837,6 @@ sub transactions { $query .= "WHERE $where ORDER BY $sortorder"; - my $sth = $dbh->prepare($query); $sth->execute(@paidargs) || $form->dberror($query); diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index a7fa9186..352b0ba0 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1579,6 +1579,9 @@ sub update_exchangerate { @queryargs = ($sell); } + if (!$set){ + $self->error("Exchange rate missing!"); + } if ($sth->fetchrow_array) { $query = qq|UPDATE exchangerate SET $set diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index 2796d5ba..f67fc5e5 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -1412,7 +1412,7 @@ sub post_invoice { $form->{duedate}, $form->{shippingpoint}, $form->{shipvia}, $form->{terms}, $form->{notes}, $form->{intnotes}, $form->{taxincluded}, $form->{currency}, $form->{department_id}, - $form->{employee_id}, $till, $form->{language_code}, + $form->{employee_id}, $form->{till}, $form->{language_code}, $form->{ponumber}, $form->{id}) || $form->dberror($query); @@ -1220,7 +1220,6 @@ sub search { sub transactions { - if ($form->{$form->{vc}}) { $form->{$form->{vc}} = $form->unescape($form->{$form->{vc}}); ($form->{$form->{vc}}, $form->{"$form->{vc}_id"}) = split(/--/, $form->{$form->{vc}}); @@ -123,20 +123,24 @@ sub add { sub openinvoices { undef %column_data; undef %column_heading; + $form->{customer} = ""; + $form->{customer_id} = 0; + delete $form->{l_subtotal}; + delete $form->{subtotal}; $ENV{REMOTE_ADDR} =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/; $form->{till} = $4; $form->{sort} = 'transdate'; - for (qw(open l_invnumber l_transdate l_name l_amount l_curr l_till l_subtotal)) { $form->{$_} = 'Y'; } + for (qw(open l_invnumber l_transdate l_name l_amount l_curr l_till)) { $form->{$_} = 'Y'; } if ($myconfig{role} ne 'user') { $form->{l_employee} = 'Y'; } $form->{title} = $locale->text('Open'); - transactions; + &transactions; } |