Beispiel #1
0
    def markup(self, value, name, descid):
        cmd = E.discount('',
                         value=value,
                         name=name,
                         descid=str(descid),
                         action='markup')

        self.send_command(cmd, check_for_errors=True)
Beispiel #2
0
    def item(self,
             name,
             quantity,
             quantityunit,
             ptu,
             price,
             plu='',
             action='sale',
             recipe='',
             charge='',
             description='',
             discount_name='',
             discount_value=None,
             discount_descid=0):
        if discount_value is not None:
            dsc = E.discount('',
                             action='discount',
                             name=discount_name,
                             value=discount_value,
                             descid=str(discount_descid))
        else:
            dsc = ''

        cmd = E.item(dsc,
                     name=name,
                     quantity=str(quantity),
                     quantityunit=quantityunit,
                     ptu=ptu,
                     price=str(price),
                     plu=plu,
                     action=action,
                     recipe=recipe,
                     charge=charge,
                     description=description)

        self.send_command(cmd, check_for_errors=True)