Invoice, Invoice Editor Changes

If someone did not notice this yet please check it as you may be in trouble..

452 -> 481 cs-cart changed how invoices are shown.

Say you got many currencies in store just so customers would easier understand the price, but you operate in your national currency, write invoice and add products in that currency.

CS-cart decided if you got this currency say UK pound and customer placed order while navigating in this currency, invoice will be only in that currency does not even matter if your payment methods does not even support it or your accountant is not able to process this either!

In 452 if I were using currency selector in backend this was changing currency for invoice aswell, but not it is not possible to change invoice currency in tweak invoice editor..

If there is anyone who can help me revert this crazy change please let me know

I have tried to print invoices in different currencies on the demo and it works correctly.

I mean tweak and send invoice editor not print function.

- you can print invoice in any currency but without it being edited

- if you tweak and send invoice to customer you cannot change currency only in one customer viewed.

Who and why changed this? What the logic behind this? I still have my old 452 on subdomain and it does not work like this.

How do I revert this stupid logic?


What php file is responsible for invoice generation ?

editor.jpg

Try to add currency parameter to app/controllers/backend/orders.php

replace

$view->assign('invoice', $document_type->renderById($order_id, 'invoice', CART_LANGUAGE));

with

$view->assign('invoice', $document_type->renderById($order_id, 'invoice', CART_LANGUAGE, CART_SECONDARY_CURRENCY));

(!) Not tested

it works perfect! Thanks a lot :)

Thank you for keeping me updated!

This code is not found in 4.12.1 maybe you can update to current ?

Thanks

Try to add currency parameter to app/controllers/backend/orders.php

replace

$view->assign('invoice', $document_type->renderById($order_id, 'invoice', CART_LANGUAGE));

with

$view->assign('invoice', $document_type->renderById($order_id, 'invoice', CART_LANGUAGE, CART_SECONDARY_CURRENCY));

(!) Not tested

sorry disregard this... Found it. Still works :)

Many thanks

Is it located in the same file?

yes correct

Is it located in the same file?