qq|LEFT JOIN department d ON (d.id = a.department_id)|;
my $where = "1 = 1";
+
+ unless ( $::auth->assert('show_ar_transactions', 1) ) {
+ $where .= " AND NOT invoice = 'f' "; # remove ar transactions from Sales -> Reports -> Invoices
+ };
+
if ($form->{customernumber}) {
$where .= " AND c.customernumber = ?";
push(@values, $form->{customernumber});
my ($self, $form, $for_post_payments) = @_;
my ($exchangerate, $akey, $j, $k, $index, $taxamount, $totaltax, $taxrate, $diff, $totalwithholding, $withholdingrate,
- $totalamount, $taxincluded, $tax);
+ $totalamount, $tax);
# forex
$form->{forex} = $form->{exchangerate};
}
}
- $form->{taxincluded} = $taxincluded if ($form->{id});
$form->{paidaccounts} = 1 if not defined $form->{paidaccounts};
if ($form->{taxincluded} && $form->{taxrate} && $totalamount) {