// Fix #PSCFV-4094

This commit is contained in:
rGaillard
2012-09-17 09:43:45 +00:00
parent 85070d67c9
commit fc47301946
2 changed files with 12 additions and 2 deletions
+11 -1
View File
@@ -213,9 +213,19 @@ class OrderSlipCore extends ObjectModel
$orderSlip = new OrderSlip();
$orderSlip->id_customer = (int)($order->id_customer);
$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->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())
return false;
+1 -1
View File
@@ -464,7 +464,7 @@ function toggleShippingCost(obj)
{
generateDiscount = $(obj).parent().find('#generateDiscount').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').css('display', 'none');