From: Joe Date: Thu, 8 Dec 2022 09:08:06 +0000 (+0100) Subject: Customer Transactions, Allocations and Supplier Transactions, Allocations has got... X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=ee0dff4cdf462ac0476531181ad61ff7f9db1c6c Customer Transactions, Allocations and Supplier Transactions, Allocations has got another selection type, Journal Entries. --- diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index 45253e32..43a4d685 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -2145,7 +2145,8 @@ function cust_allocations_list_cells($label, $name, $selected=null, $submit_on_c '2'=> _("Unsettled transactions"), '3' => _("Payments"), '4' => _("Credit Notes"), - '5' => _("Delivery Notes") + '5' => _("Delivery Notes"), + '6' => _("Journal Entries") ); echo array_selector($name, $selected, $allocs, array('select_submit'=> $submit_on_change)); echo "\n"; @@ -2161,7 +2162,8 @@ function supp_allocations_list_cell($name, $selected=null) '2'=> _("Overdue Invoices"), '3' => _("Payments"), '4' => _("Credit Notes"), - '5' => _("Overdue Credit Notes") + '5' => _("Overdue Credit Notes"), + '6' => _("Journal Entries") ); echo array_selector($name, $selected, $allocs); echo "\n"; @@ -2178,7 +2180,8 @@ function supp_transactions_list_cell($name, $selected=null, $submit_on_change=fa '2'=> _("Unsettled transactions"), '3' => _("Payments"), '4' => _("Credit Notes"), - '5' => _("Overdue Credit Notes") + '5' => _("Overdue Credit Notes"), + '7' => _("Journal Entries") ); echo array_selector($name, $selected, $allocs, array('select_submit'=> $submit_on_change)); diff --git a/purchasing/includes/db/supp_trans_db.inc b/purchasing/includes/db/supp_trans_db.inc index aa9490af..2d3a46dd 100644 --- a/purchasing/includes/db/supp_trans_db.inc +++ b/purchasing/includes/db/supp_trans_db.inc @@ -288,6 +288,10 @@ function get_sql_for_supplier_inquiry($filter, $after_date, $to_date, $supplier_ { $sql .= " AND trans.type = ".ST_SUPPCREDIT." "; } + elseif (($filter == '7')) + { + $sql .= " AND trans.type = ".ST_JOURNAL." "; + } if (($filter == '2') || ($filter == '5')) { diff --git a/purchasing/includes/db/suppalloc_db.inc b/purchasing/includes/db/suppalloc_db.inc index cf996d60..228f7b1c 100644 --- a/purchasing/includes/db/suppalloc_db.inc +++ b/purchasing/includes/db/suppalloc_db.inc @@ -302,6 +302,10 @@ function get_sql_for_supplier_allocation_inquiry() { $sql .= " AND trans.type = ".ST_SUPPCREDIT." "; } + elseif ($_POST['filterType'] == '6') // Journal + { + $sql .= " AND trans.type = ".ST_JOURNAL." "; + } if (($_POST['filterType'] == '2') || ($_POST['filterType'] == '5')) // overdude { diff --git a/sales/includes/db/cust_trans_db.inc b/sales/includes/db/cust_trans_db.inc index 602c4127..1492cba9 100644 --- a/sales/includes/db/cust_trans_db.inc +++ b/sales/includes/db/cust_trans_db.inc @@ -386,6 +386,10 @@ function get_sql_for_customer_inquiry($from, $to, $cust_id = ALL_TEXT, $filter = { $sql .= " AND trans.type = ".ST_CUSTDELIVERY." "; } + elseif ($filter == '6') + { + $sql .= " AND trans.type = ".ST_JOURNAL." "; + } if ($filter == '2') { diff --git a/sales/includes/db/custalloc_db.inc b/sales/includes/db/custalloc_db.inc index a202d313..ea7db7da 100644 --- a/sales/includes/db/custalloc_db.inc +++ b/sales/includes/db/custalloc_db.inc @@ -322,6 +322,10 @@ function get_sql_for_customer_allocation_inquiry($from, $to, $customer, $filterT { $sql .= " AND trans.type = ".ST_CUSTCREDIT." "; } + elseif ($filterType == '6') + { + $sql .= " AND trans.type = ".ST_JOURNAL." "; + } if ($filterType == '2') {