mirror of
				https://github.com/Eledio/superfaktura-client.git
				synced 2025-11-01 00:18:25 +01:00 
			
		
		
		
	examples: simplify add_invoice
This commit is contained in:
		| @@ -21,7 +21,8 @@ Dependencies: | ||||
|     - superfaktura.utils.data_types.Date | ||||
| """ | ||||
|  | ||||
| from examples.tools import save_file_as_pdf | ||||
| from pathlib import Path | ||||
|  | ||||
| from superfaktura.bank_account import BankAccount | ||||
| from superfaktura.client_contacts import ClientContactModel | ||||
| from superfaktura.enumerations.currency import Currencies | ||||
| @@ -72,7 +73,8 @@ def main(): | ||||
|     ) | ||||
|     _pdf = invoice.get_pdf(invoice=resp, language=Language.English) | ||||
|  | ||||
|     save_file_as_pdf(_pdf, "invoice.pdf") | ||||
|     p = Path("invoice.pdf") | ||||
|     p.write_bytes(_pdf) | ||||
|  | ||||
|  | ||||
| if __name__ == "__main__": | ||||
|   | ||||
		Reference in New Issue
	
	Block a user