1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Add credit gateway type id

This commit is contained in:
David Bomba 2020-10-26 13:06:24 +11:00
parent 1b2922b57c
commit 651a1a6cbe
3 changed files with 3 additions and 1 deletions

View File

@ -116,6 +116,7 @@ class AutoBillInvoice extends AbstractService
$payment->currency_id = $this->invoice->client->getSetting('currency_id');
$payment->date = now();
$payment->status_id = Payment::STATUS_COMPLETED;
$payment->type_id = PaymentType::CREDIT;
$payment->service()->applyNumber()->save();
$payment->invoices()->attach($this->invoice->id, ['amount' => $amount]);

View File

@ -35,6 +35,7 @@ class GatewayTypesSeeder extends Seeder
['id' => 11, 'alias' => 'apple_pay', 'name' => 'Apple Pay'],
['id' => 12, 'alias' => 'custom2', 'name' => 'Custom'],
['id' => 13, 'alias' => 'custom3', 'name' => 'Custom'],
['id' => 14, 'alias' => 'credit', 'name' => 'Credit'],
];
foreach ($gateway_types as $gateway_type) {

View File

@ -31,7 +31,7 @@ class PaymentTypesSeeder extends Seeder
const GATEWAY_TYPE_APPLE_PAY = 11;
const GATEWAY_TYPE_CUSTOM2 = 12;
const GATEWAY_TYPE_CUSTOM3 = 13;
const GATEWAY_TYPE_CREDIT = 13;
const GATEWAY_TYPE_CREDIT = 14;
public function run()
{