64fc4a30 by 王聪

接口更新

1 parent fef93cd0
...@@ -37,18 +37,18 @@ class NSCInvoiceView(GenericView): ...@@ -37,18 +37,18 @@ class NSCInvoiceView(GenericView):
37 @use_args(input_args, location='data') 37 @use_args(input_args, location='data')
38 def post(self, request, args): # interface_report mpos to ocr 38 def post(self, request, args): # interface_report mpos to ocr
39 content = args.get('content', {}) 39 content = args.get('content', {})
40 invoice_code = content['invoiceCode'] 40 invoice_code = content.get('invoiceCode', '')
41 invoice_number = content['invoiceNumber'] 41 invoice_number = content.get('invoiceNumber', '')
42 issue_date = content['issueDate'] 42 issue_date = content.get('issueDate', None)
43 buyer_name = content['buyerName'] 43 buyer_name = content.get('buyerName', '')
44 buyer_id = content['buyerId'] 44 buyer_id = content.get('buyerId', 0)
45 vin = content['vin'] 45 vin = content.get('vin', '')
46 dealer = content['dealer'] 46 dealer = content.get('dealer', '')
47 price_with_vat = content['priceWithVat'] 47 price_with_vat = content.get('priceWithVat', 0.0)
48 price_no_vat = content['priceNoVat'] 48 price_no_vat = content.get('priceNoVat', 0.0)
49 price_in_capitals = content['priceInCapitals'] 49 price_in_capitals = content.get('priceInCapitals', '')
50 vat = content['vat'] 50 vat = content.get('vat', 0.0)
51 vat_rate = content['vatRate'] 51 vat_rate = content.get('vatRate', 0.0)
52 52
53 return response.ok() 53 return response.ok()
54 54
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!