From: Janusz Dobrowolski Date: Mon, 28 Oct 2013 08:35:17 +0000 (+0100) Subject: Allocate Customer Payment or Credit Note, Allocate Supplier Payment or Credit Note... X-Git-Tag: v2.4.2~19^2~326 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b07ff0ac025d4f4510a7de0808cd2da886c1c7c6;p=fa-stable.git Allocate Customer Payment or Credit Note, Allocate Supplier Payment or Credit Note: settled amount displayed in header. --- diff --git a/purchasing/allocations/supplier_allocate.php b/purchasing/allocations/supplier_allocate.php index a1249406..2ebbb227 100644 --- a/purchasing/allocations/supplier_allocate.php +++ b/purchasing/allocations/supplier_allocate.php @@ -57,11 +57,12 @@ function edit_allocations_for_transaction($type, $trans_no) display_heading2(_("Total:"). " " . price_format(-$cart->bank_amount).' '.$cart->currency.""); - if ($cart->currency != $cart->person_curr) + if (floatcmp($cart->bank_amount, $cart->amount)) { - $total = _("Total in clearing currency:") . " " . price_format(-$cart->amount)."" - . sprintf(" %s (%s %s/%s)", $cart->person_curr, exrate_format($cart->bank_amount/$cart->amount), $cart->currency, $cart->person_curr); - display_heading2($total); + $total = _("Amount ot be settled:") . " " . price_format(-$cart->amount).' '.$cart->person_curr.""; + if ($cart->currency != $cart->person_curr) + $total .= sprintf(" (%s %s/%s)", exrate_format($cart->bank_amount/$cart->amount), $cart->currency, $cart->person_curr); + display_heading2($total); } echo "
"; diff --git a/sales/allocations/customer_allocate.php b/sales/allocations/customer_allocate.php index cf0005fe..f269ca4b 100644 --- a/sales/allocations/customer_allocate.php +++ b/sales/allocations/customer_allocate.php @@ -54,11 +54,12 @@ function edit_allocations_for_transaction($type, $trans_no) display_heading2(_("Date:") . " " . $cart->date_ . ""); display_heading2(_("Total:"). " " . price_format($cart->bank_amount).' '.$cart->currency.""); - if ($cart->currency != $cart->person_curr) + if (floatcmp($cart->bank_amount, $cart->amount)) { - $total = _("Total in clearing currency:") . " " . price_format($cart->amount)."" - . sprintf(" %s (%s %s/%s)", $cart->person_curr, exrate_format($cart->bank_amount/$cart->amount), $cart->currency, $cart->person_curr); - display_heading2($total); + $total = _("Amount ot be settled:") . " " . price_format($cart->amount).' '.$cart->person_curr.""; + if ($cart->currency != $cart->person_curr) + $total .= sprintf(" (%s %s/%s)", exrate_format($cart->bank_amount/$cart->amount), $cart->currency, $cart->person_curr); + display_heading2($total); } echo "
";