mirror of
https://github.com/grocy/grocy.git
synced 2025-08-16 10:44:37 +00:00
Fixed product Grocycode handling on /purchase (references #2571)
This commit is contained in:
@@ -358,7 +358,7 @@ if (Grocy.Components.ProductPicker !== undefined)
|
||||
Grocy.Api.Get('objects/product_barcodes?query[]=barcode=' + document.getElementById("product_id").getAttribute("barcode"),
|
||||
function(barcodeResult)
|
||||
{
|
||||
if (barcodeResult)
|
||||
if (barcodeResult && barcodeResult.length > 0)
|
||||
{
|
||||
var barcode = barcodeResult[0];
|
||||
$("#purchase-form").attr("data-used-barcode", barcode.id);
|
||||
|
Reference in New Issue
Block a user