Commit d868cc4f by François C.

allow 4 digits

parent a21df69b
Pipeline #2450 passed with stage
in 1 minute 25 seconds
...@@ -1182,7 +1182,7 @@ function setLineEdition(product) { ...@@ -1182,7 +1182,7 @@ function setLineEdition(product) {
} else { } else {
document.getElementById('product_uom').innerHTML = ' / unité'; document.getElementById('product_uom').innerHTML = ' / unité';
$('#edition_input').attr('type', 'number') $('#edition_input').attr('type', 'number')
.attr('step', 0.01) .attr('step', (allow_four_digits_in_reception_price == "True" ? 0.0001 : 0.01))
.attr('max', 9999); .attr('max', 9999);
} }
} else if (editing_product.product_uom[0] == 21) { // kg } else if (editing_product.product_uom[0] == 21) { // kg
...@@ -1194,7 +1194,7 @@ function setLineEdition(product) { ...@@ -1194,7 +1194,7 @@ function setLineEdition(product) {
} else { } else {
document.getElementById('product_uom').innerHTML = ' / kg'; document.getElementById('product_uom').innerHTML = ' / kg';
$('#edition_input').attr('type', 'number') $('#edition_input').attr('type', 'number')
.attr('step', 0.01) .attr('step', (allow_four_digits_in_reception_price == "True" ? 0.0001 : 0.01))
.attr('max', 9999); .attr('max', 9999);
} }
} }
......
...@@ -33,7 +33,7 @@ def home(request): ...@@ -33,7 +33,7 @@ def home(request):
'merge_orders_pswd': getattr(settings, 'RECEPTION_MERGE_ORDERS_PSWD', 'makeastop'), 'merge_orders_pswd': getattr(settings, 'RECEPTION_MERGE_ORDERS_PSWD', 'makeastop'),
'couchdb_server': settings.COUCHDB['url'], 'couchdb_server': settings.COUCHDB['url'],
'db': settings.COUCHDB['dbs']['reception'], 'db': settings.COUCHDB['dbs']['reception'],
'POUCHDB_VERSION': getattr(settings, 'POUCHDB_VERSION', '') 'POUCHDB_VERSION': getattr(settings, 'POUCHDB_VERSION', ''),
} }
template = loader.get_template('reception/index.html') template = loader.get_template('reception/index.html')
...@@ -93,7 +93,8 @@ def produits(request, id): ...@@ -93,7 +93,8 @@ def produits(request, id):
"ADD_ALL_LEFT_IS_GOOD_QTIES": False, "ADD_ALL_LEFT_IS_GOOD_QTIES": False,
"ADD_ALL_LEFT_IS_GOOD_PRICES": False, "ADD_ALL_LEFT_IS_GOOD_PRICES": False,
'add_products_pswd': getattr(settings, 'RECEPTION_ADD_PRODUCTS_PSWD', 'makeastop'), 'add_products_pswd': getattr(settings, 'RECEPTION_ADD_PRODUCTS_PSWD', 'makeastop'),
'update_qty_pswd': getattr(settings, 'RECEPTION_UPDATE_QTY_PSWD', 'makeastop') 'update_qty_pswd': getattr(settings, 'RECEPTION_UPDATE_QTY_PSWD', 'makeastop'),
'allow_four_digits_in_reception_price': getattr(settings, 'ALLOW_FOUR_DIGITS_IN_RECEPTION_PRICE', False),
} }
fixed_barcode_prefix = '0490' fixed_barcode_prefix = '0490'
......
...@@ -245,6 +245,7 @@ ...@@ -245,6 +245,7 @@
var add_all_left_is_good_prices = "{{ADD_ALL_LEFT_IS_GOOD_PRICES}}" var add_all_left_is_good_prices = "{{ADD_ALL_LEFT_IS_GOOD_PRICES}}"
var add_products_pswd = "{{add_products_pswd}}" var add_products_pswd = "{{add_products_pswd}}"
var update_qty_pswd = "{{update_qty_pswd}}" var update_qty_pswd = "{{update_qty_pswd}}"
var allow_four_digits_in_reception_price = '{{allow_four_digits_in_reception_price}}';
</script> </script>
<script src="{% static "js/all_common.js" %}?v=1651853225"></script> <script src="{% static "js/all_common.js" %}?v=1651853225"></script>
<script src='{% static "js/barcodes.js" %}?v=1651853225'></script> <script src='{% static "js/barcodes.js" %}?v=1651853225'></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment