-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how too #1
Comments
Χμ, νομίζω πως το Python αντικείμενο που δημιουργείς δεν αντιστοιχεί σε αυτό που δέχεται το Για παράδειχμα, αν μετατρέψεις σε XML το παραπάνω αντικείμενο, χρησιμοποιώντας την συνάρτηση <?xml version="1.0" encoding="UTF-8"?>
<ns0:InvoicesDoc xmlns:ns0="http://www.aade.gr/myDATA/invoice/v1.0">
<ns0:invoice>
<ns0:issuer>
<ns0:vatNumber>123456789</ns0:vatNumber>
<ns0:country>GR</ns0:country>
<ns0:branch>0</ns0:branch>
</ns0:issuer>
<ns0:counterpart>
<ns0:vatNumber>997483917</ns0:vatNumber>
<ns0:country>GR</ns0:country>
<ns0:branch>0</ns0:branch>
<ns0:address/>
</ns0:counterpart>
<ns0:invoiceHeader>
<ns0:series>ff</ns0:series>
<ns0:aa>0001</ns0:aa>
<ns0:issueDate>2021-01-01</ns0:issueDate>
<ns0:invoiceType>1.1</ns0:invoiceType>
<ns0:currency>EUR</ns0:currency>
</ns0:invoiceHeader>
<ns0:paymentMethods/>
<ns0:invoiceDetails>
<ns0:lineNumber>1</ns0:lineNumber>
<ns0:netValue>100</ns0:netValue>
<ns0:vatCategory>1</ns0:vatCategory>
<ns0:vatAmount>24</ns0:vatAmount>
<ns0:incomeClassification>
<ns1:classificationType xmlns:ns1="https://www.aade.gr/myDATA/incomeClassificaton/v1.0">E3_106</ns1:classificationType>
<ns1:classificationCategory xmlns:ns1="https://www.aade.gr/myDATA/incomeClassificaton/v1.0">1</ns1:classificationCategory>
<ns1:amount xmlns:ns1="https://www.aade.gr/myDATA/incomeClassificaton/v1.0">100</ns1:amount>
</ns0:incomeClassification>
</ns0:invoiceDetails>
</ns0:invoice>
</ns0:InvoicesDoc> Όμως, το xml που πρέπει να στείλεις έχει αυτή την μορφή: <?xml version="1.0" encoding="UTF-8"?>
<AadeBookInvoiceType>
<ns0:issuer xmlns:ns0="http://www.aade.gr/myDATA/invoice/v1.0">
<ns0:vatNumber>123456789</ns0:vatNumber>
<ns0:country>GR</ns0:country>
<ns0:branch>0</ns0:branch>
</ns0:issuer>
<ns0:counterpart xmlns:ns0="http://www.aade.gr/myDATA/invoice/v1.0">
<ns0:vatNumber>123456789</ns0:vatNumber>
<ns0:country>GR</ns0:country>
<ns0:branch>0</ns0:branch>
</ns0:counterpart>
...
</AadeBookInvoiceType> Για να φτάσεις σε ένα τέτοιο XML, πρέπει η τελική κλάση να είναι το - invoice.issuer = issuer
- invoice.counterpart = counterpart
- invoice.invoice_header = header
- invoice.payment_methods = paymentDetails
- invoice.invoice_details = prod1
- invDoc = InvoiceProvider.InvoicesDoc()
- invDoc.invoice = invoice
+ invDoc = InvoiceProvider.AadeBookInvoiceType(issuer=issuer,
+ counterpart=counterpart,
+ invoice_header=header,
+ payment_methods=paymentDetails,
+ invoice_details=prod1) Τέλος, για να σιγουρευτείς ότι το Python class σου περνάει validation πριν το στείλεις στην ΑΑΔΕ, μπορείς να το κάνεις XML με την
|
Καλησπερα ,
Προσπαθησα λιγο κοιτωντας το κωδικα σου να στειλω παραστατικα αλλα δεν δουλεψε. λογικα κατι κανω λαθος
The text was updated successfully, but these errors were encountered: