mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Updates for seeders
This commit is contained in:
parent
b70f01fff2
commit
145fef637b
@ -92,6 +92,7 @@ class BTCPayPaymentDriver extends BaseDriver
|
||||
{
|
||||
$webhook_payload = file_get_contents('php://input');
|
||||
|
||||
/** @var \stdClass $btcpayRep */
|
||||
$btcpayRep = json_decode($webhook_payload);
|
||||
if ($btcpayRep == null) {
|
||||
throw new PaymentFailed('Empty data');
|
||||
@ -109,6 +110,7 @@ class BTCPayPaymentDriver extends BaseDriver
|
||||
return;
|
||||
}
|
||||
|
||||
$sig = '';
|
||||
$headers = getallheaders();
|
||||
foreach ($headers as $key => $value) {
|
||||
if (strtolower($key) === 'btcpay-sig') {
|
||||
@ -141,6 +143,7 @@ class BTCPayPaymentDriver extends BaseDriver
|
||||
];
|
||||
$payment = $this->createPayment($dataPayment, $StatusId);
|
||||
} else {
|
||||
/** @var \App\Models\Payment $payment */
|
||||
$payment = Payment::find($this->payment_hash->payment_id);
|
||||
$StatusId = $payment->status_id;
|
||||
}
|
||||
|
@ -115,7 +115,8 @@ class PayPalPPCPPaymentDriver extends PayPalBasePaymentDriver
|
||||
{
|
||||
|
||||
nlog("response");
|
||||
|
||||
$r = false;
|
||||
|
||||
$request['gateway_response'] = str_replace("Error: ", "", $request['gateway_response']);
|
||||
$response = json_decode($request['gateway_response'], true);
|
||||
|
||||
|
@ -62,7 +62,8 @@ class PayPalRestPaymentDriver extends PayPalBasePaymentDriver
|
||||
{
|
||||
nlog("response");
|
||||
$this->init();
|
||||
|
||||
$r = false;
|
||||
|
||||
$request['gateway_response'] = str_replace("Error: ", "", $request['gateway_response']);
|
||||
$response = json_decode($request['gateway_response'], true);
|
||||
|
||||
|
@ -196,7 +196,9 @@ class RoEInvoice extends AbstractService
|
||||
$ubl_invoice->setDocumentCurrencyCode($invoice->client->getCurrencyCode());
|
||||
$ubl_invoice->setTaxCurrencyCode($invoice->client->getCurrencyCode());
|
||||
|
||||
foreach ($invoice->line_items as $index => $item) {
|
||||
$taxName = '';
|
||||
|
||||
foreach ($invoice->line_items as $index => $item) {
|
||||
|
||||
if (!empty($item->tax_name1)) {
|
||||
$taxName = $item->tax_name1;
|
||||
@ -205,9 +207,7 @@ class RoEInvoice extends AbstractService
|
||||
} elseif (!empty($item->tax_name3)) {
|
||||
$taxName = $item->tax_name3;
|
||||
}
|
||||
else {
|
||||
$taxName = '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$supplier_party = $this->createParty($company, $companyVatNr, $coEmail, $coPhone, $companyIdn, $coFullName, 'company', $taxName);
|
||||
|
@ -564,6 +564,7 @@ class TemplateService
|
||||
'credit_balance' => $invoice->client->credit_balance,
|
||||
'vat_number' => $invoice->client->vat_number ?? '',
|
||||
'currency' => $invoice->client->currency()->code ?? 'USD',
|
||||
'locale' => substr($invoice->client->locale(),0,2),
|
||||
],
|
||||
'payments' => $payments,
|
||||
'total_tax_map' => $invoice->calc()->getTotalTaxMap(),
|
||||
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if($c=\App\Models\Currency::find(63))
|
||||
{
|
||||
$c->precision = 0;
|
||||
$c->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@ -85,7 +85,7 @@ class CurrenciesSeeder extends Seeder
|
||||
['id' => 60, 'name' => 'Taiwan New Dollar', 'code' => 'TWD', 'symbol' => 'NT$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['id' => 61, 'name' => 'Dominican Peso', 'code' => 'DOP', 'symbol' => 'RD$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['id' => 62, 'name' => 'Chilean Peso', 'code' => 'CLP', 'symbol' => '$', 'precision' => '0', 'thousand_separator' => '.', 'decimal_separator' => ','],
|
||||
['id' => 63, 'name' => 'Icelandic Króna', 'code' => 'ISK', 'symbol' => 'kr', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ',', 'swap_currency_symbol' => true],
|
||||
['id' => 63, 'name' => 'Icelandic Króna', 'code' => 'ISK', 'symbol' => 'kr', 'precision' => '0', 'thousand_separator' => '.', 'decimal_separator' => ',', 'swap_currency_symbol' => true],
|
||||
['id' => 64, 'name' => 'Papua New Guinean Kina', 'code' => 'PGK', 'symbol' => 'K', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['id' => 65, 'name' => 'Jordanian Dinar', 'code' => 'JOD', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['id' => 66, 'name' => 'Myanmar Kyat', 'code' => 'MMK', 'symbol' => 'K', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user