def test_invoice(self): inv = Invoice() inv.invoice_number = '59128' inv.customer = 'Saks Fifth Avenue' inv.store_number = '0689' inv.tracking_number = '1ZW885Y21349335867' inv.ship_date = datetime(2015, 12, 15) inv.discount_code = '05' inv.discount = 0 inv.sscc_number = '803276200000591289' inv.po_number = '6163130' inv.dept_number = '0162' inv.dc_number = '0185' inv.total_cost = 4575 inv.total_qty = 7 inv.address1 = 'ONE WALDENBOOKS DRIVE' inv.address2 = 'DC# 185 STORE# 689' inv.city_state_zip = 'LA VERGNE, TN 37086' p1 = Item() p1.style = 'CB1779- -Y-02-42.0' p1.upc = '8032762238027' p1.qty = 1 p1.cost = 795.0 inv.items.append(p1) #p2 = Product('OB1234- -Y-02-0') self.test_invoices.append(inv)
def generate_invoice(self): invoice = Invoice(invoice_number=self.InvoiceEdit.text(), customer=self.CustomerBox.currentText(), po_number=self.order.po_number, dc_number=self.DcBox.text(), tracking_number=self.TrackingBox.text(), ship_date=self.ShipDateCal.date(), store_number=self.StoreBox.currentText()) invoice.dept_number(False, self.settings['Customer Settings'] [invoice.customer]['Asset Department'], self.settings['Customer Settings'] [invoice.customer]['Memo Department']) invoice.discount(self.DiscountSpin.value()) invoice.items = self.ItemTable.model().item_list invoice.get_totals() invoice.sscc_number = generate_sscc(invoice.invoice_number) return invoice
def generate_invoice(self): invoice = Invoice(invoice_number=self.InvoiceEdit.text(), customer=self.CustomerBox.currentText(), po_number=self.order.po_number, dc_number=self.DcBox.text(), tracking_number=self.TrackingBox.text(), ship_date=self.ShipDateCal.date(), store_number=self.StoreBox.currentText()) invoice.dept_number( False, self.settings['Customer Settings'][invoice.customer] ['Asset Department'], self.settings['Customer Settings'][ invoice.customer]['Memo Department']) invoice.discount(self.DiscountSpin.value()) invoice.items = self.ItemTable.model().item_list invoice.get_totals() invoice.sscc_number = generate_sscc(invoice.invoice_number) return invoice