64fc4a30 by 王聪

接口更新

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