diff --git a/admin-dev/themes/template/orders/_new_product.tpl b/admin-dev/themes/template/orders/_new_product.tpl
index 7ddee6c8c..002f12235 100644
--- a/admin-dev/themes/template/orders/_new_product.tpl
+++ b/admin-dev/themes/template/orders/_new_product.tpl
@@ -5,6 +5,10 @@
{l s='Combinations:'}
+
+ {l s='Warehouse:'}
+
{if $currency->sign % 2}{$currency->sign}{/if} {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}
diff --git a/admin-dev/themes/template/orders/form.tpl b/admin-dev/themes/template/orders/form.tpl
index de997dfa5..81113a1fd 100755
--- a/admin-dev/themes/template/orders/form.tpl
+++ b/admin-dev/themes/template/orders/form.tpl
@@ -175,7 +175,7 @@
updateQty(product[0], product[1], $(this).val() - cart_quantity[$(this).attr('rel')]);
}
});
- $('.increaseqty_product,.decreaseqty_product').live('click', function(e) {
+ $('.increaseqty_product, .decreaseqty_product').live('click', function(e) {
e.preventDefault();
var product = $(this).attr('rel').split('_');
var sign = '';
@@ -183,10 +183,18 @@
sign = '-';
updateQty(product[0], product[1], sign+1);
});
+ $('#id_product').live('keydown', function(e) {
+ $(this).click();
+ return true;
+ });
$('#id_product, .id_product_attribute').live('change', function(e) {
e.preventDefault();
displayQtyInStock(this.id);
});
+ $('#id_product, .id_product_attribute').live('keydown', function(e) {
+ $(this).change();
+ return true;
+ });
$('.product_unit_price').live('change', function(e) {
e.preventDefault();
var product = $(this).attr('rel').split('_');
@@ -233,10 +241,13 @@
function displayQtyInStock(id)
{
- if (id == 'id_product')
- $('#qty_in_stock').html($('#id_product option:selected').attr('rel'));
+ var id_product = $('#id_product').val();
+ if ($('#ipa_' + id_product + ' option').length)
+ var id_product_attribute = $('#ipa_' + id_product).val();
else
- $('#qty_in_stock').html($('#ipa_'+$('#id_product option:selected').val()+' option:selected').attr('rel'));
+ var id_product_attribute = 0;
+
+ $('#qty_in_stock').html(stock[id_product][id_product_attribute]);
}
function duplicateOrder(id_order)
@@ -460,6 +471,8 @@
{
var products_found = '';
var attributes_html = '';
+ stock = {};
+
if(res.found)
{
$('#products_err').hide();
@@ -469,12 +482,19 @@
$.each(res.products, function() {
products_found += '';
attributes_html += '';
});
+
products_found += '';
+
$('#products_found #product_list').html(products_found);
$('#products_found #attributes_list').html(attributes_html);
displayProductAttributes();
@@ -771,14 +791,14 @@
-
-
-
-
- {l s='In stock:'}
-
+
+
+
+
+ {l s='In stock:'}
+
diff --git a/admin-dev/themes/template/orders/view.tpl b/admin-dev/themes/template/orders/view.tpl
index a2432f0b4..7bdbb7c6b 100755
--- a/admin-dev/themes/template/orders/view.tpl
+++ b/admin-dev/themes/template/orders/view.tpl
@@ -507,6 +507,9 @@
|