added cost and uom to receipted plu items
This commit is contained in:
parent
29ba974704
commit
71db5e621b
@ -1,4 +1,5 @@
|
||||
SELECT items.item_uuid, items.item_name
|
||||
SELECT items.item_uuid, items.item_name, item_info.cost, item_info.uom
|
||||
FROM %%site_name%%_items items
|
||||
LEFT JOIN %%site_name%%_item_info item_info ON item_info.id = items.item_info_id
|
||||
WHERE items.item_type = 'FOOD_PLU' ORDER BY items.item_name ASC
|
||||
LIMIT %s OFFSET %s;
|
||||
@ -299,8 +299,8 @@ async function addPLUToReceipt(item) {
|
||||
item_uuid: item.item_uuid ,
|
||||
item_name: item.item_name,
|
||||
qty: 1,
|
||||
uom: 1,
|
||||
data: {'cost': 0.00, 'expires': false}
|
||||
uom: item.uom,
|
||||
data: {'cost': item.cost, 'expires': false}
|
||||
}, type: 'PLU SKU'})
|
||||
await replenishScannedReceiptTable(scannedReceiptItems)
|
||||
}
|
||||
|
||||
@ -92,13 +92,14 @@ async function replenishLinesTable(receipt_items) {
|
||||
if(receipt_items[i].type == 'api'){
|
||||
label_color = 'purple'
|
||||
}
|
||||
if(receipt_items[i].type == 'PLU SKU'){
|
||||
label_color = 'blue'
|
||||
}
|
||||
|
||||
typeCell.innerHTML = `<span style="background-color: ${label_color};" class="uk-label">${receipt_items[i].type}</span>`
|
||||
let nameCell = document.createElement('td')
|
||||
nameCell.innerHTML = receipt_items[i].name
|
||||
|
||||
|
||||
|
||||
let operationsCell = document.createElement('td')
|
||||
|
||||
let apiOp = document.createElement('a')
|
||||
@ -285,6 +286,14 @@ async function openLineEditModal(line_data) {
|
||||
document.getElementById('lineUOM').classList.remove('uk-disabled')
|
||||
}
|
||||
|
||||
if(line_data.type === 'PLU SKU'){
|
||||
document.getElementById('lineUOM').classList.add('uk-disabled')
|
||||
} else {
|
||||
document.getElementById('lineUOM').classList.remove('uk-disabled')
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(!line_data.data.expires){
|
||||
document.getElementById('lineExpires').classList.add('uk-disabled')
|
||||
} else {
|
||||
|
||||
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
Loading…
x
Reference in New Issue
Block a user