Show customer for POS batches
This commit is contained in:
parent
53e8c15267
commit
91ac1a9031
|
@ -42,6 +42,7 @@ class POSBatchView(BatchMasterView):
|
||||||
|
|
||||||
grid_columns = [
|
grid_columns = [
|
||||||
'id',
|
'id',
|
||||||
|
'customer',
|
||||||
'created',
|
'created',
|
||||||
'created_by',
|
'created_by',
|
||||||
'rowcount',
|
'rowcount',
|
||||||
|
@ -54,8 +55,7 @@ class POSBatchView(BatchMasterView):
|
||||||
|
|
||||||
form_fields = [
|
form_fields = [
|
||||||
'id',
|
'id',
|
||||||
'description',
|
'customer',
|
||||||
'notes',
|
|
||||||
'params',
|
'params',
|
||||||
'rowcount',
|
'rowcount',
|
||||||
'sales_total',
|
'sales_total',
|
||||||
|
@ -98,13 +98,15 @@ class POSBatchView(BatchMasterView):
|
||||||
def configure_grid(self, g):
|
def configure_grid(self, g):
|
||||||
super().configure_grid(g)
|
super().configure_grid(g)
|
||||||
|
|
||||||
g.set_type('sales_total', 'currency')
|
g.set_link('customer')
|
||||||
g.set_type('tax1_total', 'currency')
|
|
||||||
g.set_type('tax2_total', 'currency')
|
|
||||||
|
|
||||||
g.set_link('created')
|
g.set_link('created')
|
||||||
g.set_link('created_by')
|
g.set_link('created_by')
|
||||||
|
|
||||||
|
g.set_type('sales_total', 'currency')
|
||||||
|
g.set_type('tax1_total', 'currency')
|
||||||
|
g.set_type('tax2_total', 'currency')
|
||||||
|
|
||||||
def grid_extra_class(self, batch, i):
|
def grid_extra_class(self, batch, i):
|
||||||
if batch.void:
|
if batch.void:
|
||||||
return 'warning'
|
return 'warning'
|
||||||
|
@ -112,6 +114,8 @@ class POSBatchView(BatchMasterView):
|
||||||
def configure_form(self, f):
|
def configure_form(self, f):
|
||||||
super().configure_form(f)
|
super().configure_form(f)
|
||||||
|
|
||||||
|
f.set_renderer('customer', self.render_customer)
|
||||||
|
|
||||||
f.set_type('sales_total', 'currency')
|
f.set_type('sales_total', 'currency')
|
||||||
f.set_type('tax1_total', 'currency')
|
f.set_type('tax1_total', 'currency')
|
||||||
f.set_type('tax2_total', 'currency')
|
f.set_type('tax2_total', 'currency')
|
||||||
|
|
Loading…
Reference in a new issue