Details
Description
To reproduce:
- Create a service with no config options
- Edit the service and set an override currency/price
- Generate a renewal invoice
- See the invoice total is not the override price, but rather the override price times the exchange rate of the override currency
Try this to resolve. In Invoices::getLinesForServices() update:
$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)
];
Activity
Jonathan Reissmueller
created issue -
Jonathan Reissmueller
made changes -
Field | Original Value | New Value |
---|---|---|
Sprint | 5.2.0 Sprint 3 [ 140 ] |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Assignee | Jonathan Reissmueller [ jonathan ] |
Jonathan Reissmueller
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Jonathan Reissmueller
made changes -
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Jonathan Reissmueller
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 15 minutes [ 900 ] | |
Worklog Id | 15215 [ 15215 ] |
Jonathan Reissmueller
made changes -
Status | In Review [ 5 ] | Closed [ 6 ] |