Changeset - bab66fb250f0
[Not reviewed]
0 1 0
Lance Edgar (lance) - 23 months ago 2022-12-06 10:14:24
lance@edbob.org
Fallback to product master for case size, in vendor invoice batch
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rattail/batch/vendorinvoice.py
Show inline comments
 
@@ -160,6 +160,11 @@ class VendorInvoiceHandler(BatchHandler):
 
        row.description = product.description
 
        row.size = product.size
 

	
 
        # fetch case size from product master, if invoice didn't provide
 
        if not row.case_quantity:
 
            products_handler = self.app.get_products_handler()
 
            row.case_quantity = products_handler.get_case_size(product)
 

	
 
        # Calculate case cost if the parser couldn't provide one.
 
        if not row.case_cost and row.unit_cost and row.case_quantity:
 
            row.case_cost = row.unit_cost * row.case_quantity
0 comments (0 inline, 0 general)