// fix little bug on AdminOrdersController

[~] Deprecated: Cart::getOrderShippingCost()
This commit is contained in:
aFolletete
2011-11-30 17:25:27 +00:00
parent 8394ab35c2
commit 37cdfcdeea
7 changed files with 107 additions and 106 deletions
+5 -5
View File
@@ -560,27 +560,27 @@
<table class="table" width="300px;" cellspacing="0" cellpadding="0">
<tr id="total_products">
<td width="150px;"><b>{l s='Products'}</b></td>
<td align="right">{displayPrice price=$order->total_products_wt currency=$currency->id}</td>
<td class="amount" align="right">{displayPrice price=$order->total_products_wt currency=$currency->id}</td>
<td class="partial_refund_fields" style="display:none;background-color:rgb(232, 237, 194);">&nbsp;</td>
</tr>
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
<td><b>{l s='Discounts'}</b></td>
<td align="right">-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}</td>
<td class="amount" align="right">-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}</td>
<td class="partial_refund_fields" style="display:none;background-color:rgb(232, 237, 194);">&nbsp;</td>
</tr>
<tr id="total_wrapping" {if $order->total_wrapping_tax_incl == 0}style="display: none;"{/if}>
<td><b>{l s='Wrapping'}</b></td>
<td align="right">{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}</td>
<td class="amount" align="right">{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}</td>
<td class="partial_refund_fields" style="display:none;background-color:rgb(232, 237, 194);">&nbsp;</td>
</tr>
<tr id="total_shipping">
<td><b>{l s='Shipping'}</b></td>
<td align="right">{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td>
<td class="amount" align="right">{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td>
<td class="partial_refund_fields" style="display:none;background-color:rgb(232, 237, 194);"><input type="text" size="3" name="partialRefundShippingCost" /> &euro;</td>
</tr>
<tr style="font-size: 20px" id="total_order">
<td style="font-size: 20px">{l s='Total'}</td>
<td style="font-size: 20px" align="right">
<td class="amount" style="font-size: 20px" align="right">
{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}
</td>
<td class="partial_refund_fields" style="display:none;background-color:rgb(232, 237, 194);">&nbsp;</td>
+2 -2
View File
@@ -563,8 +563,8 @@ class CarrierCore extends ObjectModel
}
$row['name'] = (strval($row['name']) != '0' ? $row['name'] : Configuration::get('PS_SHOP_NAME'));
$row['price'] = ($shipping_method == Carrier::SHIPPING_METHOD_FREE ? 0 : $cart->getOrderShippingCost((int)$row['id_carrier']));
$row['price_tax_exc'] = ($shipping_method == Carrier::SHIPPING_METHOD_FREE ? 0 : $cart->getOrderShippingCost((int)$row['id_carrier'], false));
$row['price'] = ($shipping_method == Carrier::SHIPPING_METHOD_FREE ? 0 : $cart->getPackageShippingCost((int)$row['id_carrier']));
$row['price_tax_exc'] = ($shipping_method == Carrier::SHIPPING_METHOD_FREE ? 0 : $cart->getPackageShippingCost((int)$row['id_carrier'], false));
$row['img'] = file_exists(_PS_SHIP_IMG_DIR_.(int)$row['id_carrier']).'.jpg' ? _THEME_SHIP_DIR_.(int)$row['id_carrier'].'.jpg' : '';
// If price is false, then the carrier is unavailable (carrier module)
+4 -3
View File
@@ -275,8 +275,8 @@ class CartCore extends ObjectModel
$total_products_ti = $this->getOrderTotal(true, Cart::ONLY_PRODUCTS);
$total_products_te = $this->getOrderTotal(false, Cart::ONLY_PRODUCTS);
$shipping_ti = $this->getOrderShippingCost();
$shipping_te = $this->getOrderShippingCost(NULL, false);
$shipping_ti = $this->getPackageShippingCost();
$shipping_te = $this->getPackageShippingCost(NULL, false);
$result = Db::getInstance()->executeS('
SELECT *
@@ -1630,6 +1630,7 @@ class CartCore extends ObjectModel
*/
public function getOrderShippingCost($id_carrier = null, $useTax = true, Country $default_country = null, $product_list = null)
{
Tools::displayAsDeprecated();
return $this->getPackageShippingCost($id_carrier, $useTax, $default_country, $product_list);
}
@@ -2526,7 +2527,7 @@ class CartCore extends ObjectModel
return false;
}
/**
* Return false is some product from the cart are out of stock
*/
+6 -6
View File
@@ -174,12 +174,12 @@ class CartRuleCore extends ObjectModel
INSERT INTO `'._DB_PREFIX_.'cart_rule_combination` (`id_cart_rule_1`, `id_cart_rule_2`)
(SELECT '.(int)$id_cart_rule_destination.', IF(id_cart_rule_1 != '.(int)$id_cart_rule_source.', id_cart_rule_1, id_cart_rule_2) FROM `'._DB_PREFIX_.'cart_rule_combination`
WHERE `id_cart_rule_1` = '.(int)$id_cart_rule_source.' OR `id_cart_rule_2` = '.(int)$id_cart_rule_source.')');
// Todo : should be changed soon, be must be copied too
// Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule` WHERE `id_cart_rule` = '.(int)$this->id);
// Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_value` WHERE `id_product_rule` NOT IN (SELECT `id_product_rule` FROM `'._DB_PREFIX_.'cart_rule_product_rule`)');
}
public static function getIdByCode($code)
{
if (!Validate::isDiscountName($code))
@@ -452,7 +452,7 @@ class CartRuleCore extends ObjectModel
if ($this->free_shipping)
{
if (!$this->carrier_restriction)
$reductionValue += $context->cart->getOrderShippingCost($context->cart->id_carrier, $useTax = true, $context->country);
$reductionValue += $context->cart->getPackageShippingCost($context->cart->id_carrier, $useTax = true, $context->country);
elseif ($context->cart->id_carrier)
{
$id_cart_rule = (int)Db::getInstance()->getValue('
@@ -461,7 +461,7 @@ class CartRuleCore extends ObjectModel
WHERE crc.id_cart_rule = '.(int)$this->id.'
AND crc.id_carrier = '.(int)$context->cart->id_carrier);
if ($id_cart_rule)
$reductionValue += $context->cart->getOrderShippingCost($context->cart->id_carrier, $useTax, $context->country);
$reductionValue += $context->cart->getPackageShippingCost($context->cart->id_carrier, $useTax, $context->country);
}
}
@@ -492,7 +492,7 @@ class CartRuleCore extends ObjectModel
}
}
// Discount (¤)
// Discount ()
if ($this->reduction_amount)
{
$reduction_amount = $this->reduction_amount;
@@ -529,7 +529,7 @@ class CartRuleCore extends ObjectModel
$reductionValue += $reduction_amount * (1 + $product_vat_rate);
}
}
// Discount (¤) on the whole order
// Discount () on the whole order
elseif ($this->reduction_product == 0)
{
$cart_amount_ti = $context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS);
+1 -1
View File
@@ -344,7 +344,7 @@ class OrderCore extends ObjectModel
$cart->update();
/* Update order */
$shippingDiff = $this->total_shipping - $cart->getOrderShippingCost();
$shippingDiff = $this->total_shipping - $cart->getPackageShippingCost();
$this->total_products -= $productPriceWithoutTax;
// After upgrading from old version
+9 -9
View File
@@ -980,15 +980,15 @@ class AdminOrdersControllerCore extends AdminController
$order_invoice->total_paid_tax_incl = Tools::ps_round((float)$cart->getOrderTotal($use_taxes, Cart::BOTH), 2);
$order_invoice->total_products = (float)$cart->getOrderTotal(false, Cart::ONLY_PRODUCTS);
$order_invoice->total_products_wt = (float)$cart->getOrderTotal($use_taxes, Cart::ONLY_PRODUCTS);
$order_invoice->total_shipping_tax_excl = (float)$cart->getOrderShippingCost(null, false);
$order_invoice->total_shipping_tax_incl = (float)$cart->getOrderShippingCost();
$order_invoice->total_shipping_tax_excl = (float)$cart->getPackageShippingCost(null, false);
$order_invoice->total_shipping_tax_incl = (float)$cart->getPackageShippingCost();
$order_invoice->total_wrapping_tax_excl = abs($cart->getOrderTotal(false, Cart::ONLY_WRAPPING));
$order_invoice->total_wrapping_tax_incl = abs($cart->getOrderTotal($use_taxes, Cart::ONLY_WRAPPING));
// Update current order field, only shipping because other field is updated later
$order->total_shipping += (float)$cart->getOrderShippingCost();
$order->total_shipping_tax_excl += (float)$cart->getOrderShippingCost(null, false);
$order->total_shipping_tax_incl += (float)$cart->getOrderShippingCost(null, $use_taxes);
$order->total_shipping += (float)$cart->getPackageShippingCost();
$order->total_shipping_tax_excl += (float)$cart->getPackageShippingCost(null, false);
$order->total_shipping_tax_incl += (float)$cart->getPackageShippingCost(null, $use_taxes);
$order->total_wrapping += abs($cart->getOrderTotal($use_taxes, Cart::ONLY_WRAPPING));
$order->total_wrapping_tax_excl += abs($cart->getOrderTotal(false, Cart::ONLY_WRAPPING));
@@ -997,7 +997,7 @@ class AdminOrdersControllerCore extends AdminController
// Adding an entry in order_carrier table
Db::getInstance()->execute('
INSERT INTO `'._DB_PREFIX_.'order_carrier` (`id_order`, `id_carrier`, `id_order_invoice`, `weight`, `shipping_cost_tax_excl`, `shipping_cost_tax_incl`, `date_add`) VALUES
('.(int)$order->id.', '.(int)$order->id_carrier.', '.(int)$order_invoice->id.', '.(float)$cart->getTotalWeight().', '.(float)$cart->getOrderShippingCost(null, false).', '.(float)$cart->getOrderShippingCost(null, $use_taxes).', NOW())');
('.(int)$order->id.', '.(int)$order->id_carrier.', '.(int)$order_invoice->id.', '.(float)$cart->getTotalWeight().', '.(float)$cart->getPackageShippingCost(null, false).', '.(float)$cart->getPackageShippingCost(null, $use_taxes).', NOW())');
}
// Update current invoice
else
@@ -1006,8 +1006,8 @@ class AdminOrdersControllerCore extends AdminController
$order_invoice->total_paid_tax_incl += Tools::ps_round((float)($cart->getOrderTotal($use_taxes, Cart::BOTH)), 2);
$order_invoice->total_products += (float)$cart->getOrderTotal(false, Cart::ONLY_PRODUCTS);
$order_invoice->total_products_wt += (float)$cart->getOrderTotal($use_taxes, Cart::ONLY_PRODUCTS);
$order_invoice->total_shipping_tax_excl += (float)$cart->getOrderShippingCost(null, false);
$order_invoice->total_shipping_tax_incl += (float)$cart->getOrderShippingCost(null, $use_taxes);
$order_invoice->total_shipping_tax_excl += (float)$cart->getPackageShippingCost(null, false);
$order_invoice->total_shipping_tax_incl += (float)$cart->getPackageShippingCost(null, $use_taxes);
$order_invoice->total_wrapping_tax_excl += abs($cart->getOrderTotal(false, Cart::ONLY_WRAPPING));
$order_invoice->total_wrapping_tax_incl += abs($cart->getOrderTotal($use_taxes, Cart::ONLY_WRAPPING));
$order_invoice->update();
@@ -1283,7 +1283,7 @@ class AdminOrdersControllerCore extends AdminController
'error' => Tools::displayError('Can\'t edit this Order Detail for this order')
)));
if ($order_invoice->id_order != Tools::getValue('id_order'))
if (!empty($order_invoice) && $order_invoice->id_order != Tools::getValue('id_order'))
die(Tools::jsonEncode(array(
'result' => false,
'error' => Tools::displayError('Can\'t use this invoice for this order')
+80 -80
View File
@@ -36,13 +36,13 @@ $(document).ready(function() {
$('tr#new_product').slideDown('fast', function () {
$('tr#new_product td').fadeIn('fast');
});
$.scrollTo('tr#new_product', 1200, {offset: -100});
return false;
});
$("#add_product_product_name").autocomplete(admin_order_tab_link,
$("#add_product_product_name").autocomplete(admin_order_tab_link,
{
minChars: 3,
max: 10,
@@ -90,7 +90,7 @@ $(document).ready(function() {
$('#add_product_product_price_tax_excl').val(data.price_tax_excl);
addProductRefreshTotal();
$('#add_product_product_stock').html(data.qty_in_stock);
if (current_product.combinations.length !== 0)
{
// Reset combinations list
@@ -112,68 +112,68 @@ $(document).ready(function() {
}
}
});
$('select#add_product_product_attribute_id').change(function() {
$('#add_product_product_price_tax_incl').val(current_product.combinations[$(this).val()].price_tax_incl);
$('#add_product_product_price_tax_excl').val(current_product.combinations[$(this).val()].price_tax_excl);
addProductRefreshTotal();
$('#add_product_product_stock').html(current_product.combinations[$(this).val()].qty_in_stock);
});
$('input#add_product_product_quantity').keyup(function() {
var quantity = parseInt($(this).val());
var quantity = parseInt($(this).val());
if (quantity < 1 || isNaN(quantity))
quantity = 1;
var stock_available = parseInt($('#add_product_product_stock').html());
// total update
addProductRefreshTotal();
// stock status update
if (quantity > stock_available)
$('#add_product_product_stock').css('font-weight', 'bold').css('color', 'red').css('font-size', '1.2em');
else
$('#add_product_product_stock').css('font-weight', 'normal').css('color', 'black').css('font-size', '1em');;
});
$('#submitAddProduct').click(function() {
var go = true;
if ($('input#add_product_product_id').val() == 0)
{
alert(txt_add_product_no_product);
go = false;
}
if ($('input#add_product_product_quantity').val() == 0)
{
alert(txt_add_product_no_product_quantity);
go = false;
}
if ($('input#add_product_product_price_excl').val() == 0)
{
alert(txt_add_product_no_product_price);
go = false;
}
if (go)
{
if (parseInt($('input#add_product_product_quantity').val()) > parseInt($('#add_product_product_stock').html()))
go = confirm(txt_add_product_stock_issue);
if (go && $('select#add_product_product_invoice').val() == 0)
go = confirm(txt_add_product_new_invoice);
if (go)
{
var query = 'ajax=1&token='+token+'&action=addProductOnOrder&id_order='+id_order+'&';
query += $('tr#new_product select, tr#new_product input').serialize();
if ($('select#add_product_product_invoice').val() == 0)
query += '&'+$('tr#new_invoice select, tr#new_invoice input').serialize();
$.ajax({
type: 'POST',
url: admin_order_tab_link,
@@ -193,65 +193,65 @@ $(document).ready(function() {
alert(data.error);
}
});
}
}
}
});
$('#edit_shipping_cost_link').click(function() {
$('#shipping_cost_show').hide();
$('#shipping_cost_edit').show();
$('#edit_shipping_cost_link').hide();
$('#cancel_shipping_cost_link').show();
return false;
});
$('#cancel_shipping_cost_link').click(function() {
$('#shipping_cost_show').show();
$('#shipping_cost_edit').hide();
$('#edit_shipping_cost_link').show();
$('#cancel_shipping_cost_link').hide();
return false;
});
$('.edit_shipping_number_link').click(function() {
$(this).parent().find('.shipping_number_show').hide();
$(this).parent().find('.shipping_number_edit').show();
$(this).parent().find('.edit_shipping_number_link').hide();
$(this).parent().find('.cancel_shipping_number_link').show();
return false;
});
$('.cancel_shipping_number_link').click(function() {
$(this).parent().find('.shipping_number_show').show();
$(this).parent().find('.shipping_number_edit').hide();
$(this).parent().find('.edit_shipping_number_link').show();
$(this).parent().find('.cancel_shipping_number_link').hide();
return false;
});
$('#add_product_product_invoice').change(function() {
if ($(this).val() == '0')
$('#new_invoice').slideDown('slow');
else
$('#new_invoice').slideUp('slow');
});
$('#add_product_product_price_tax_excl').keyup(function() {
var price_tax_excl = parseFloat($(this).val());
if (price_tax_excl < 0 || isNaN(price_tax_excl))
price_tax_excl = 0;
var tax_rate = current_product.tax_rate / 100 + 1;
$('#add_product_product_price_tax_incl').val(ps_round(price_tax_excl * tax_rate, 2));
// Update total product
addProductRefreshTotal();
});
@@ -260,21 +260,21 @@ $(document).ready(function() {
var price_tax_incl = parseFloat($(this).val());
if (price_tax_incl < 0 || isNaN(price_tax_incl))
price_tax_incl = 0;
var tax_rate = current_product.tax_rate / 100 + 1;
$('#add_product_product_price_tax_excl').val(ps_round(price_tax_incl / tax_rate, 2));
// Update total product
addProductRefreshTotal();
});
$('.edit_product_change_link').click(function() {
$('.add_product_fields').hide();
$('.standard_refund_fields').hide();
$('.edit_product_fields').show();
$('.cancel_product_change_link:visible').trigger('click');
closeAddProduct();
query = 'ajax=1&token='+token+'&action=loadProductInformation&id_order_detail='+
$(this).parent().parent().find('input.edit_product_id_order_detail').val()+'&id_address='+id_address;
var element = $(this);
@@ -296,11 +296,11 @@ $(document).ready(function() {
element.parent().parent().find('td .product_price_edit').parent().attr('align', 'left');
element.parent().parent().find('td .product_price_edit').show();
element.parent().parent().find('td .product_quantity_edit').show();
element.parent().parent().find('td.cancelCheck').hide();
element.parent().parent().find('td.cancelQuantity').hide();
element.parent().parent().find('td.product_invoice').show();
element.parent().children('.delete_product_line').hide();
element.parent().children('.edit_product_change_link').hide();
element.parent().children('input[name=submitProductChange]').show();
@@ -316,18 +316,18 @@ $(document).ready(function() {
return false;
});
$('.cancel_product_change_link').click(function() {
current_product = null;
$('.edit_product_fields').show();
$(this).parent().parent().css('background-color', '#FFF');
$(this).parent().parent().find('td .product_price_show').show();
$(this).parent().parent().find('td .product_quantity_show').show();
$(this).parent().parent().find('td .product_price_edit').parent().attr('align', 'center');
$(this).parent().parent().find('td .product_price_edit').hide();
$(this).parent().parent().find('td .product_quantity_edit').hide();
$(this).parent().parent().find('td.product_invoice').hide();
$(this).parent().parent().find('td.cancelCheck').show();
$(this).parent().parent().find('td.cancelQuantity').show();
@@ -339,27 +339,27 @@ $(document).ready(function() {
$('.standard_refund_fields').hide();
return false;
});
$('input[name=submitProductChange]').click(function() {
if ($(this).parent().parent().find('td .edit_product_quantity').val() <= 0)
{
alert(txt_add_product_no_product_quantity);
return false;
}
if ($(this).parent().parent().find('td .edit_product_price').val() <= 0)
{
alert(txt_add_product_no_product_price);
return false;
}
if (confirm(txt_confirm))
{
var element = $(this);
query = 'ajax=1&token='+token+'&action=editProductOnOrder&id_order='+id_order+'&'+
element.parent().parent().find('input:visible, select:visible, input.edit_product_id_order_detail').serialize();
$.ajax({
type: 'POST',
url: admin_order_tab_link,
@@ -380,52 +380,52 @@ $(document).ready(function() {
}
});
}
return false;
});
$('.edit_product_price_tax_excl').keyup(function() {
var price_tax_excl = parseFloat($(this).val());
if (price_tax_excl < 0 || isNaN(price_tax_excl))
price_tax_excl = 0;
var tax_rate = current_product.tax_rate / 100 + 1;
$('.edit_product_price_tax_incl:visible').val(ps_round(price_tax_excl * tax_rate, 2));
// Update total product
editProductRefreshTotal($(this));
});
$('.edit_product_price_tax_incl').keyup(function() {
var price_tax_incl = parseFloat($(this).val());
if (price_tax_incl < 0 || isNaN(price_tax_incl))
price_tax_incl = 0;
var tax_rate = current_product.tax_rate / 100 + 1;
$('.edit_product_price_tax_excl:visible').val(ps_round(price_tax_incl / tax_rate, 2));
// Update total product
editProductRefreshTotal($(this));
});
$('.edit_product_quantity').keyup(function() {
var quantity = parseInt($(this).val());
var quantity = parseInt($(this).val());
if (quantity < 1 || isNaN(quantity))
quantity = 1;
var stock_available = parseInt($(this).parent().parent().parent().find('td.product_stock').html());
// total update
editProductRefreshTotal($(this));
});
$('.delete_product_line').click(function() {
if (!confirm(txt_confirm))
return false;
var tr_product = $(this).parent().parent();
var id_order_detail = $(this).parent().parent().find('td .edit_product_id_order_detail').val();
var query = 'ajax=1&action=deleteProductLine&token='+token+'&id_order_detail='+id_order_detail+'&id_order='+id_order;
$.ajax({
type: 'POST',
url: admin_order_tab_link,
@@ -458,7 +458,7 @@ function addProductRefreshTotal()
var price = parseFloat($('#add_product_product_price_tax_incl').val());
else
var price = parseFloat($('#add_product_product_price_tax_excl').val());
if (price < 0 || isNaN(price))
price = 0;
var total = makeTotalProductCaculation(quantity, price);
@@ -468,7 +468,7 @@ function addProductRefreshTotal()
function editProductRefreshTotal(element)
{
element = element.parent().parent().parent();
var quantity = parseInt(element.find('td .edit_product_quantity').val());
if (quantity < 1 || isNaN(quantity))
quantity = 1;
@@ -476,10 +476,10 @@ function editProductRefreshTotal(element)
var price = parseFloat(element.find('td .edit_product_price_tax_incl').val());
else
var price = parseFloat(element.find('td .edit_product_price_tax_excl').val())
if (price < 0 || isNaN(price))
price = 0;
var total = makeTotalProductCaculation(quantity, price);
element.find('td.total_product').html(formatCurrency(total, currency_format, currency_sign, currency_blank));
}
@@ -495,10 +495,10 @@ function addViewOrderDetailRow(view)
html.find('td').hide();
$('tr#new_invoice').hide();
$('tr#new_product').hide();
// Initialize fields
closeAddProduct();
$('tr#new_product').before(html);
html.find('td').each(function() {
if (!$(this).is('.product_invoice'))
@@ -510,11 +510,11 @@ function refreshProductLineView(element, view)
{
var new_product_line = $(view);
new_product_line.find('td').hide();
var current_product_line = element.parent().parent();
current_product_line.before(new_product_line);
current_product_line.remove();
new_product_line.find('td').each(function() {
if (!$(this).is('.product_invoice'))
$(this).fadeIn('slow');
@@ -523,27 +523,27 @@ function refreshProductLineView(element, view)
function updateAmounts(order)
{
$('#total_products td:last').fadeOut('slow', function() {
$('#total_products td.amount').fadeOut('slow', function() {
$(this).html(formatCurrency(parseFloat(order.total_products_wt), currency_format, currency_sign, currency_blank));
$(this).fadeIn('slow');
});
$('#total_discounts td:last').fadeOut('slow', function() {
$('#total_discounts td.amount').fadeOut('slow', function() {
$(this).html(formatCurrency(parseFloat(order.total_discounts_tax_incl), currency_format, currency_sign, currency_blank));
$(this).fadeIn('slow');
});
if (order.total_discounts_tax_incl > 0)
$('#total_discounts').slideDown('slow');
$('#total_wrapping td:last').fadeOut('slow', function() {
$('#total_wrapping td.amount').fadeOut('slow', function() {
$(this).html(formatCurrency(parseFloat(order.total_wrapping_tax_incl), currency_format, currency_sign, currency_blank));
$(this).fadeIn('slow');
});
if (order.total_wrapping_tax_incl > 0)
$('#total_wrapping').slideDown('slow');
$('#total_shipping td:last').fadeOut('slow', function() {
$('#total_shipping td.amount').fadeOut('slow', function() {
$(this).html(formatCurrency(parseFloat(order.total_shipping_tax_incl), currency_format, currency_sign, currency_blank));
$(this).fadeIn('slow');
});
$('#total_order td:last').fadeOut('slow', function() {
$('#total_order td.amount').fadeOut('slow', function() {
$(this).html(formatCurrency(parseFloat(order.total_paid_tax_incl), currency_format, currency_sign, currency_blank));
$(this).fadeIn('slow');
});
@@ -563,7 +563,7 @@ function closeAddProduct()
{
$('tr#new_invoice').hide();
$('tr#new_product').hide();
// Initialize fields
$('tr#new_product select, tr#new_product input').each(function() {
if (!$(this).is('.button'))
@@ -606,7 +606,7 @@ $(document).ready(function() {
$('.partial_refund_fields').hide();
$('.standard_refund_fields').fadeIn();
}
return false;
});
@@ -629,7 +629,7 @@ $(document).ready(function() {
$('.standard_refund_fields').hide();
$('.partial_refund_fields').fadeIn();
}
return false;
});
});