Tweak inventory batch view per new variance mode
This commit is contained in:
parent
dc5ad6ce82
commit
5bc4a1618b
|
@ -409,6 +409,10 @@ class InventoryBatchView(BatchMasterView):
|
|||
if self.creating or batch.executed or not batch.complete:
|
||||
f.remove_field('complete')
|
||||
|
||||
# rowcount
|
||||
if self.viewing and not batch.executed and not batch.complete:
|
||||
f.remove_field('rowcount')
|
||||
|
||||
# TODO: document this, maybe move it etc.
|
||||
unknown_product_creates_row = True
|
||||
|
||||
|
@ -457,6 +461,7 @@ class InventoryBatchView(BatchMasterView):
|
|||
else:
|
||||
row.upc = provided # TODO: why not 'checked' instead? how to choose?
|
||||
row.description = "(unknown product)"
|
||||
self.handler.capture_current_units(row)
|
||||
self.handler.add_row(batch, row)
|
||||
return row
|
||||
|
||||
|
@ -569,13 +574,16 @@ class InventoryBatchView(BatchMasterView):
|
|||
f.set_readonly('size')
|
||||
f.set_readonly('previous_units_on_hand')
|
||||
f.set_readonly('case_quantity')
|
||||
f.set_readonly('variance')
|
||||
f.set_readonly('unit_cost')
|
||||
f.set_readonly('total_cost')
|
||||
|
||||
# quantity fields
|
||||
f.set_type('case_quantity', 'quantity')
|
||||
f.set_type('previous_units_on_hand', 'quantity')
|
||||
f.set_type('cases', 'quantity')
|
||||
f.set_type('units', 'quantity')
|
||||
f.set_type('variance', 'quantity')
|
||||
|
||||
# currency fields
|
||||
f.set_type('unit_cost', 'currency')
|
||||
|
|
Loading…
Reference in a new issue