Exemplo n.º 1
0
 def show(self, xfer):
     if self.item.status == 0:
         SupportingEditor.show_third(self, xfer)
         xfer.get_components('date').colspan += 1
         xfer.get_components('expensedetail').colspan += 1
     else:
         SupportingEditor.show(self, xfer)
Exemplo n.º 2
0
 def show(self, xfer):
     if xfer.item.cost_accounting is None:
         xfer.remove_component("cost_accounting")
         xfer.remove_component("lbl_cost_accounting")
     xfer.params['new_account'] = Params.getvalue('invoice-account-third')
     xfer.move(0, 0, 1)
     lbl = XferCompLabelForm('title')
     lbl.set_location(1, 0, 4)
     lbl.set_value_as_title(get_value_if_choices(
         self.item.bill_type, self.item.get_field_by_name('bill_type')))
     xfer.add_component(lbl)
     details = xfer.get_components('detail')
     if Params.getvalue("invoice-vat-mode") != 0:
         if Params.getvalue("invoice-vat-mode") == 1:
             details.headers[2] = XferCompHeader(details.headers[2].name, _(
                 'price excl. taxes'), details.headers[2].type, details.headers[2].orderable)
             details.headers[6] = XferCompHeader(details.headers[6].name, _(
                 'total excl. taxes'), details.headers[6].type, details.headers[6].orderable)
         elif Params.getvalue("invoice-vat-mode") == 2:
             details.headers[2] = XferCompHeader(details.headers[2].name, _(
                 'price incl. taxes'), details.headers[2].type, details.headers[2].orderable)
             details.headers[6] = XferCompHeader(details.headers[6].name, _(
                 'total incl. taxes'), details.headers[6].type, details.headers[6].orderable)
         xfer.get_components('lbl_total_excltax').set_value_as_name(
             _('total excl. taxes'))
         xfer.filltab_from_model(1, xfer.get_max_row() + 1, True,
                                 [((_('VTA sum'), 'vta_sum'), (_('total incl. taxes'), 'total_incltax'))])
     if self.item.status == 0:
         SupportingEditor.show_third(self, xfer, 'invoice.add_bill')
     else:
         SupportingEditor.show_third_ex(self, xfer)
         details.actions = []
         if self.item.bill_type != 0:
             SupportingEditor.show(self, xfer)
     return
Exemplo n.º 3
0
 def show(self, xfer):
     if self.item.status == Expense.STATUS_BUILDING:
         SupportingEditor.show_third(self, xfer)
         xfer.get_components('date').colspan += 1
         xfer.get_components('expensedetail').colspan += 1
     elif self.item.status != Expense.STATUS_CANCEL:
         SupportingEditor.show(self, xfer)
Exemplo n.º 4
0
 def show(self, xfer):
     if self.item.status == 0:
         SupportingEditor.show_third(self, xfer)
     else:
         SupportingEditor.show(self, xfer)