Abdullah Posted August 7, 2021 Report Posted August 7, 2021 Hello, i don´t know if this is only me, but using v5.1.2 automatic currency conversion for Invoices is broken and we have all wrong invoices. Steps to replicate:- Default currency - USD Client Account Preferred Currency - INR Package Currency - USD Package price override - INR Now, say the package is override priced INR200 , but the renewal invoice is generated for [200USD equivalent] INR14,873 Anyone else can reproduce & confirm ? Quote
Jono Posted August 10, 2021 Report Posted August 10, 2021 Just to confirm, you have set an override price/currency on the service? Quote
Abdullah Posted August 10, 2021 Author Report Posted August 10, 2021 35 minutes ago, Jono said: Just to confirm, you have set an override price/currency on the service? Hi Jono, Yes, I have set override price & currency to 200 INR Quote
Jono Posted August 11, 2021 Report Posted August 11, 2021 Confirmed. Try updating app/models/invoices.php around line 1528 from: $items[] = [ 'service_id' => $service_id, 'qty' => $item->qty, 'amount' => $this->Currencies->convert( $item->price, $service->package_pricing->currency, $currency, Configure::get('Blesta.company_id') ), 'description' => $item->description, 'tax' => !empty($item->taxes) ]; To $items[] = [ 'service_id' => $service_id, 'qty' => $item->qty, 'amount' => $this->Currencies->convert( $item->price, $service->override_currency ?? $service->package_pricing->currency, $currency, Configure::get('Blesta.company_id') ), 'description' => $item->description, 'tax' => !empty($item->taxes) ]; I've created CORE-4441 to handle this. Abdullah 1 Quote
Abdullah Posted August 12, 2021 Author Report Posted August 12, 2021 19 hours ago, Jono said: Confirmed. Try updating app/models/invoices.php around line 1528 from: $items[] = [ 'service_id' => $service_id, 'qty' => $item->qty, 'amount' => $this->Currencies->convert( $item->price, $service->package_pricing->currency, $currency, Configure::get('Blesta.company_id') ), 'description' => $item->description, 'tax' => !empty($item->taxes) ]; To $items[] = [ 'service_id' => $service_id, 'qty' => $item->qty, 'amount' => $this->Currencies->convert( $item->price, $service->override_currency ?? $service->package_pricing->currency, $currency, Configure::get('Blesta.company_id') ), 'description' => $item->description, 'tax' => !empty($item->taxes) ]; I've created CORE-4441 to handle this. Thanks for confirming! I will try it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.