Update inventory in cancel invoice

This commit is contained in:
Mauricio Baeza 2021-10-03 22:21:01 -05:00
parent 00cbe4d557
commit c4e29e47fa
2 changed files with 2 additions and 0 deletions

View File

@ -5890,6 +5890,7 @@ class Facturas(BaseModel):
cant = Decimal(p.cantidad) cant = Decimal(p.cantidad)
if cancel: if cancel:
cant *= -1 cant *= -1
warehouse = p.warehouse
p.producto.existencia -= cant p.producto.existencia -= cant
p.producto.save() p.producto.save()

View File

@ -236,6 +236,7 @@ RFCS = {
'CVD110412TF6': 'finkok', 'CVD110412TF6': 'finkok',
'SCD110105654': 'comercio', 'SCD110105654': 'comercio',
'AAA010101AAA': 'comercio', 'AAA010101AAA': 'comercio',
'SPR190613I52': 'comercio',
} }
URL = { URL = {