$query =
qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey, tax_id, chart_link) | .
qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, | .
- qq| (SELECT taxkey_id FROM chart WHERE accno = ?)| .
+ qq| (SELECT taxkey_id FROM chart WHERE accno = ?),| .
qq| (SELECT tax_id| .
qq| FROM taxkeys| .
qq| WHERE chart_id= (SELECT id | .
qq|LEFT JOIN payment_terms pt ON (pt.id = v.payment_id)|;
my $where = '';
+
+ unless ( $::auth->assert('show_ap_transactions', 1) ) {
+ $where .= " AND NOT invoice = 'f' "; # remove ap transactions from Sales -> Reports -> Invoices
+ };
+
my @values;
if ($form->{vendor_id}) {
my ($self, $form, $for_post_payments) = @_;
my ($exchangerate, $i, $j, $k, $key, $akey, $ref, $index, $taxamount, $totalamount, $totaltax, $totalwithholding, $withholdingrate,
- $taxincluded, $tax, $diff);
+ $tax, $diff);
# 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) {
}
1;
-