diff --git a/tailbone/views/batch/pricing.py b/tailbone/views/batch/pricing.py index 6a8c56f2..57a97a62 100644 --- a/tailbone/views/batch/pricing.py +++ b/tailbone/views/batch/pricing.py @@ -199,6 +199,8 @@ class PricingBatchView(BatchMasterView): g.set_filter('vendor_id', model.Vendor.id) g.set_renderer('vendor_id', self.render_vendor_id) + g.set_renderer('subdepartment_number', self.render_subdepartment_number) + g.set_type('old_price', 'currency') g.set_type('new_price', 'currency') g.set_type('price_diff', 'currency') @@ -213,6 +215,13 @@ class PricingBatchView(BatchMasterView): return "" return vendor_id + def render_subdepartment_number(self, row, field): + if row.subdepartment_number: + if row.subdepartment_name: + return HTML.tag('span', title=row.subdepartment_name, + c=six.text_type(row.subdepartment_number)) + return row.subdepartment_number + def render_true_margin(self, row, field): margin = row.true_margin if margin: