MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$path_to_root="..";
-$page_security = 3;
+$page_security = 'SA_SALESPAYMNT';
+$path_to_root = "..";
include_once($path_to_root . "/includes/ui/allocation_cart.inc");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
//----------------------------------------------------------------------------------------
-set_editor('customer', 'customer_id' , 'sales_type');
-set_editor('branch', 'BranchID' , 'bank_account');
if (list_updated('BranchID')) {
// when branch is selected via external editor also customer can change
+ $comp_currency = get_company_currency();
$cust_currency = get_customer_currency($_POST['customer_id']);
$bank_currency = get_bank_account_currency($_POST['bank_account']);
if ($cust_currency != $bank_currency) {
- exchange_rate_display($bank_currency, $cust_currency, $_POST['DateBanked'], true);
+ exchange_rate_display($bank_currency, $cust_currency, $_POST['DateBanked'], ($bank_currency == $comp_currency));
}
amount_row(_("Bank Charge:"), 'charge');