-
Notifications
You must be signed in to change notification settings - Fork 62
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 to change output of totals block? #376
Comments
I think the totals are printed here: The totals are in an array, so you can either just echo them one by one, but then if you add new totals, they won't show up. I would order them by the key, which is the type of the total, by using uksort. Unfortunately functional programming is not common by php programmes, so this might be outside of your skill :-/ |
Thanks for your reply. I didn't try it yet though, but I guess this should do the trick. Do you maybe have an idea on how I can add new totals to the print out too? Maybe that's a bit too much because basically all I need is an additional subtotal like for example: in Invoice: So that there's actually already a Total (excl. tax) before the tax is added. (Or the other way around for creditmemos). I was thinking about adding an if-block to the
I didn't test this yet it's just an idea. |
Hi there,
I have an issue with my pdf invoices, that you can maybe help me with.
I don't know if this has been asked before, at least I didn't find anything.
When I print invoices they have the following totals included:
(I'll list them with actual numbers as an example):
Subtotal (excl. tax) - 539,41
Subtotal (incl. tax) - 641,90
Tax (19%) - 102,49
Tax - 102,49
Total - 641,90
I hope I translated those correctly as in my invoice everything is in german.
The original values are in the same order as above:
Zwischensumme (zzg. Steuern)
Zwischensumme (inkl. Steuern)
MwSt (19%)
Steuer
Gesamtsumme
Now I have been asked to change the output to:
Subtotal (excl. tax) - Zwischensumme (netto)
Shipping (excl. tax) - Versandkosten (netto)
Total (excl. tax) - Summe (netto)
Tax (19%) - MwSt (19%)
Total (incl. tax) - Summe (brutto)
How can I address this?
Where are these fields in the invoice coming from?
From what I found these are inserted in the insertTotals function in the Abstract.php which I guess I could overwrite in my own engine.
Unfortunately my PHP and/or Magento skills aren't good enough to actually understand what is happening in this function, as It seems to me the totals (or which totals to be used) aren't defined there but coming from somewhere else.
Can you give me a hint on what may be the best way to change the output into something like above?
Many thanks in advance.
The text was updated successfully, but these errors were encountered: