Changeset 4312238 in tailbone


Ignore:
Timestamp:
03/12/19 14:25:40 (4 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
f755aef
Parents:
d0b1cb5
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tailbone/views/purchasing/receiving.py

    rd0b1cb5 r4312238  
    15561556            if warn:
    15571557                self.request.session.flash("This item was NOT on the original purchase order.", 'receiving-warning')
     1558
     1559        # maybe alert user if they've already received some of this product
     1560        alert_received = self.rattail_config.getbool('tailbone', 'receiving.alert_already_received',
     1561                                                     default=False)
     1562        if alert_received:
     1563            if self.handler.get_units_confirmed(row):
     1564                self.request.session.flash("You have already received some of this product.", 'receiving-warning')
     1565
    15581566        return self.render_to_response('receive_row', context, mobile=True)
    15591567
Note: See TracChangeset for help on using the changeset viewer.