Changeset d337def in tailbone


Ignore:
Timestamp:
03/07/19 17:05:25 (9 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
15c47fb
Parents:
3760c32
Message:

Expose new "calculated" invoice totals for receiving batch, rows

Location:
tailbone/views/purchasing
Files:
2 edited

Legend:

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

    r3760c32 rd337def  
    145145        'invoice_unit_cost',
    146146        'invoice_total',
     147        'invoice_total_calculated',
    147148        'status_code',
    148149        'credits',
     
    205206            g.filters['complete'].default_active = True
    206207            g.filters['complete'].default_verb = 'is_true'
     208
     209        # invoice_total
     210        g.set_type('invoice_total', 'currency')
     211        g.set_label('invoice_total', "Total")
     212
     213        # invoice_total_calculated
     214        g.set_type('invoice_total_calculated', 'currency')
     215        g.set_label('invoice_total_calculated', "Total")
    207216
    208217        g.set_label('date_ordered', "Ordered")
     
    348357        f.set_type('invoice_total', 'currency')
    349358
     359        # invoice_total_calculated
     360        f.set_readonly('invoice_total_calculated')
     361        f.set_type('invoice_total_calculated', 'currency')
     362
    350363        # vendor_email
    351364        f.set_readonly('vendor_email')
     
    604617        g.set_type('units_received', 'quantity')
    605618        g.set_type('po_total', 'currency')
    606         g.set_type('invoice_total', 'currency')
    607619        g.set_type('credits', 'boolean')
    608620
     
    618630        g.filters['units_received'].label = "Units Received"
    619631
     632        # invoice_total
     633        g.set_type('invoice_total', 'currency')
     634        g.set_label('invoice_total', "Total")
     635
     636        # invoice_total_calculated
     637        g.set_type('invoice_total_calculated', 'currency')
     638        g.set_label('invoice_total_calculated', "Total")
     639
    620640        g.set_label('po_total', "Total")
    621         g.set_label('invoice_total', "Total")
    622641        g.set_label('credits', "Credits?")
    623642
     
    665684        f.set_type('po_total', 'currency')
    666685        f.set_type('invoice_unit_cost', 'currency')
    667         f.set_type('invoice_total', 'currency')
    668686
    669687        # upc
    670688        f.set_type('upc', 'gpc')
     689
     690        # invoice total
     691        f.set_readonly('invoice_total')
     692        f.set_type('invoice_total', 'currency')
     693        f.set_label('invoice_total', "Invoice Total (Orig.)")
     694
     695        # invoice total_calculated
     696        f.set_readonly('invoice_total_calculated')
     697        f.set_type('invoice_total_calculated', 'currency')
     698        f.set_label('invoice_total_calculated', "Invoice Total (Calc.)")
    671699
    672700        # credits
  • tailbone/views/purchasing/receiving.py

    r3760c32 rd337def  
    162162        'created_by',
    163163        'rowcount',
     164        'invoice_total_calculated',
    164165        'status_code',
    165166        'executed',
     
    192193        'invoice_number',
    193194        'invoice_total',
     195        'invoice_total_calculated',
    194196        'notes',
    195197        'created',
     
    222224        'units_received',
    223225        # 'po_total',
    224         'invoice_total',
     226        'invoice_total_calculated',
    225227        'credits',
    226228        'status_code',
     
    253255        'invoice_unit_cost',
    254256        'invoice_total',
     257        'invoice_total_calculated',
    255258        'status_code',
    256259        'truck_dump_status',
     
    418421        if not self.editing:
    419422            f.remove_field('order_quantities_known')
     423
     424        # invoice totals
     425        f.set_label('invoice_total', "Invoice Total (Orig.)")
     426        f.set_label('invoice_total_calculated', "Invoice Total (Calc.)")
    420427
    421428    def template_kwargs_create(self, **kwargs):
     
    850857        f.set_readonly('po_unit_cost')
    851858        f.set_readonly('po_total')
     859
     860        # invoice totals
    852861        f.set_readonly('invoice_total')
     862        f.set_label('invoice_total', "Invoice Total (Orig.)")
     863        f.set_readonly('invoice_total_calculated')
     864        f.set_label('invoice_total_calculated', "Invoice Total (Calc.)")
    853865
    854866        # claims
Note: See TracChangeset for help on using the changeset viewer.