tailbone.views.purchasing.batch

Base class for purchasing batch views

class tailbone.views.purchasing.batch.PurchasingBatchView(request)[source]

Master view base class, for purchase batches. The views for both “ordering” and “receiving” batches will inherit from this.

save_edit_row_form(form)[source]

Supplements or overrides the default logic, as follows:

Ordering Mode

So far, we only allow updating the cases_ordered and/or units_ordered quantities; therefore the form data should have one or both of those fields.

This data is then passed to the update_row_quantity() method of the batch handler.

Note that the “normal” logic for this method is not invoked at all, for ordering batches.

Note

There is some logic in place for receiving mode, which sort of tries to update the overall invoice total for the batch, since the form data might cause those to need adjustment. However the logic is incomplete as of this writing.

Todo

Need to fully implement save_edit_row_form() for receiving batch.