Add mobile alert when receiving product for 2nd time
optional per config. idea is to alert user so they don't accidentally double-receive a given item
This commit is contained in:
parent
d0b1cb527e
commit
43122381f5
|
@ -1555,6 +1555,14 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
warn = False
|
||||
if warn:
|
||||
self.request.session.flash("This item was NOT on the original purchase order.", 'receiving-warning')
|
||||
|
||||
# maybe alert user if they've already received some of this product
|
||||
alert_received = self.rattail_config.getbool('tailbone', 'receiving.alert_already_received',
|
||||
default=False)
|
||||
if alert_received:
|
||||
if self.handler.get_units_confirmed(row):
|
||||
self.request.session.flash("You have already received some of this product.", 'receiving-warning')
|
||||
|
||||
return self.render_to_response('receive_row', context, mobile=True)
|
||||
|
||||
def auto_receive(self):
|
||||
|
|
Loading…
Reference in a new issue