Class s.l.i._Invoice(object):

Part of stoqlib.lib.invoice View In Hierarchy

Known subclasses: stoqlib.lib.invoice.PurchaseInvoice, stoqlib.lib.invoice.SaleInvoice

No class docstring
Method __init__ Undocumented
Method _arrange_fields Arrange all the fields.
Method _fetch_data_by_field Undocumented
Method _add_field Undocumented
Method _fetch_list_fields Fetch the list field data and seperate/sort it by page.
Method generate_pages Formats the data from the sale according to the fields specified
Method has_invoice_number Returns if the invoice has an invoice number field or not.
Method send_to_printer Send the printer invoice to the printer
def __init__(self, layout):
Undocumented
def _arrange_fields(self):
Arrange all the fields. We have three field types internally, headers, list and footers. The header iterms should appear on all pages The list items should be split up and separated by page Footer items should only appear on the last page

List items are items are invoice fields which has a list type All items which has are located above a list item is a header item and all item which are located belove is a footer item.

def _fetch_data_by_field(self, field):
Undocumented
def _add_field(self, page, field):
Undocumented
def _fetch_list_fields(self):

Fetch the list field data and seperate/sort it by page. The dictionary returned is structured like this:

 - key: page number
 - value: field, field_type, lines for the page
   - field comes from the database
   - field_type is the type of the field
   - lines is all the lines which should be printed on
     the current page
Returnsa dictionary
def generate_pages(self):
Formats the data from the sale according to the fields specified in the layout
Returnspages printed (type: a list of pages )
def has_invoice_number(self):
Returns if the invoice has an invoice number field or not.
ReturnsTrue if there is an invoice field, False otherwise
def send_to_printer(self, device):
Send the printer invoice to the printer
Parametersdevicedevice name of the printer (type: string )
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.