Fixes for Github Actions

This commit is contained in:
David Bomba 2021-07-14 09:31:01 +10:00
parent fcbef56e46
commit 9941d72d31
3 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ APP_DEBUG=true
APP_URL=http://ninja.test APP_URL=http://ninja.test
MULTI_DB_ENABLED=false MULTI_DB_ENABLED=false
# database # database
DB_CONNECTION=db-ninja-01 DB_CONNECTION=mysql
DB_DATABASE1=ninja DB_DATABASE1=ninja
DB_USERNAME1=root DB_USERNAME1=root
DB_PASSWORD1=ninja DB_PASSWORD1=ninja

View File

@ -511,7 +511,7 @@ class SubscriptionService
$total_payable = $pro_rata_refund_amount + $pro_rata_charge_amount + $this->subscription->price; $total_payable = $pro_rata_refund_amount + $pro_rata_charge_amount + $this->subscription->price;
return $this->proRataInvoice($last_invoice, $target_subscription); return $this->proRataInvoice($last_invoice, $target_subscription, $recurring_invoice->client_id);
} }
@ -614,7 +614,7 @@ nlog("handle plan change");
* @param Subscription $target * @param Subscription $target
* @return Invoice * @return Invoice
*/ */
private function proRataInvoice($last_invoice, $target) private function proRataInvoice($last_invoice, $target, $client_id)
{ {
$subscription_repo = new SubscriptionRepository(); $subscription_repo = new SubscriptionRepository();
$invoice_repo = new InvoiceRepository(); $invoice_repo = new InvoiceRepository();
@ -626,7 +626,7 @@ nlog("handle plan change");
$invoice->line_items = array_merge($subscription_repo->generateLineItems($target), $this->calculateProRataRefundItems($last_invoice)); $invoice->line_items = array_merge($subscription_repo->generateLineItems($target), $this->calculateProRataRefundItems($last_invoice));
$data = [ $data = [
'client_id' => $last_invoice->client_id, 'client_id' => $client_id,
'quantity' => 1, 'quantity' => 1,
'date' => now()->format('Y-m-d'), 'date' => now()->format('Y-m-d'),
]; ];

View File

@ -46,7 +46,7 @@ return [
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true, 'prefix_indexes' => true,
'strict' => env('DB_STRICT', false), 'strict' => env('DB_STRICT', false),
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8', // 'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
], ],
'sqlite' => [ 'sqlite' => [