mirror of
https://github.com/System-End/site.git
synced 2026-04-19 18:35:12 +00:00
Fix subtracking by the right stock value
This commit is contained in:
parent
ee71d14d63
commit
942f26b77e
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ export const shopParts = async () => {
|
|||
let stock = fields["Stock"]
|
||||
|
||||
if (stock && fields["Count of Orders Fulfilled"]) {
|
||||
fields["Stock"] -= fields["Count of Orders Fulfilled"]
|
||||
stock -= fields["Count of Orders Fulfilled"]
|
||||
}
|
||||
return { id: record.id, ...record.fields, "Stock": (stock == null)? null : (stock >= 0 ? stock : 0) }
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue