Commit 593072c7 by François C.

Merge branch '3942-allow-4-decimals-in-update-prices' into 'dev_cooperatic'

3942 allow 4 decimals in update prices

See merge request !212
parents ff876c1c d868cc4f
Pipeline #2451 passed with stage
in 1 minute 24 seconds
...@@ -19,3 +19,4 @@ shop/errors.log ...@@ -19,3 +19,4 @@ shop/errors.log
.idea .idea
members/settings.json members/settings.json
.DS_Store .DS_Store
exec.*.log
...@@ -92,3 +92,5 @@ VRAC_SHELFS = [] ...@@ -92,3 +92,5 @@ VRAC_SHELFS = []
# Should block service exchange if old service is happening in less than 24h # Should block service exchange if old service is happening in less than 24h
BLOCK_SERVICE_EXCHANGE_24H_BEFORE = False BLOCK_SERVICE_EXCHANGE_24H_BEFORE = False
ALLOW_FOUR_DIGITS_IN_RECEPTION_PRICE = True
\ No newline at end of file
...@@ -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