// Fix #PSCFV-4094
This commit is contained in:
@@ -213,9 +213,19 @@ class OrderSlipCore extends ObjectModel
|
|||||||
$orderSlip = new OrderSlip();
|
$orderSlip = new OrderSlip();
|
||||||
$orderSlip->id_customer = (int)($order->id_customer);
|
$orderSlip->id_customer = (int)($order->id_customer);
|
||||||
$orderSlip->id_order = (int)($order->id);
|
$orderSlip->id_order = (int)($order->id);
|
||||||
$orderSlip->shipping_cost = (int)($shipping_cost);
|
$orderSlip->shipping_cost = (int)$shipping_cost;
|
||||||
|
if ($orderSlip->shipping_cost)
|
||||||
|
$orderSlip->shipping_cost_amount = $order->total_shipping_tax_incl;
|
||||||
$orderSlip->conversion_rate = $currency->conversion_rate;
|
$orderSlip->conversion_rate = $currency->conversion_rate;
|
||||||
$orderSlip->partial = 0;
|
$orderSlip->partial = 0;
|
||||||
|
|
||||||
|
$orderSlip->amount = $orderSlip->shipping_cost_amount;
|
||||||
|
foreach ($productList as $id_order_detail)
|
||||||
|
{
|
||||||
|
$order_detail = new OrderDetail((int)$id_order_detail);
|
||||||
|
$orderSlip->amount += $order_detail->unit_price_tax_incl * $qtyList[(int)$id_order_detail];
|
||||||
|
}
|
||||||
|
|
||||||
if (!$orderSlip->add())
|
if (!$orderSlip->add())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -464,7 +464,7 @@ function toggleShippingCost(obj)
|
|||||||
{
|
{
|
||||||
generateDiscount = $(obj).parent().find('#generateDiscount').attr("checked");
|
generateDiscount = $(obj).parent().find('#generateDiscount').attr("checked");
|
||||||
generateCreditSlip = $(obj).parent().find('#generateCreditSlip').attr("checked");
|
generateCreditSlip = $(obj).parent().find('#generateCreditSlip').attr("checked");
|
||||||
if (generateDiscount != true && generateCreditSlip != true)
|
if (generateDiscount != 'checked' && generateCreditSlip != 'checked')
|
||||||
{
|
{
|
||||||
$(obj).parent().find('#spanShippingBack input[type=checkbox]').attr("checked", false);
|
$(obj).parent().find('#spanShippingBack input[type=checkbox]').attr("checked", false);
|
||||||
$(obj).parent().find('#spanShippingBack').css('display', 'none');
|
$(obj).parent().find('#spanShippingBack').css('display', 'none');
|
||||||
|
|||||||
Reference in New Issue
Block a user