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 assign_shipping_info(invoice: Invoice, ship_log: str): invoice = check_ship_log(invoice, ship_log) if invoice.tracking_number is None: dialog = TrackingWarningDialog(invoice.invoice_number) dialog.exec_() if dialog.confirmed is True: invoice.tracking_number = dialog.tracking invoice.ship_date = datetime.now() else: return False return invoice