Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop

This commit is contained in:
David Bomba 2024-08-29 08:49:44 +10:00
commit 27a8d205ca
4 changed files with 13 additions and 4 deletions

View File

@ -99,10 +99,10 @@ class StorecoveRouter
* Return the routing code based on country and entity classification * Return the routing code based on country and entity classification
* *
* @param string $country * @param string $country
* @param string $classification * @param ?string $classification
* @return string * @return string
*/ */
public function resolveRouting(string $country, string $classification): string public function resolveRouting(string $country, ?string $classification = 'business'): string
{ {
$rules = $this->routing_rules[$country]; $rules = $this->routing_rules[$country];
@ -133,7 +133,7 @@ class StorecoveRouter
* @param ?string $classification * @param ?string $classification
* @return string * @return string
*/ */
public function resolveTaxScheme(string $country, ?string $classification): string public function resolveTaxScheme(string $country, ?string $classification = "business"): string
{ {
$rules = isset($this->routing_rules[$country]) ? $this->routing_rules[$country] : [false, false, false, false]; $rules = isset($this->routing_rules[$country]) ? $this->routing_rules[$country] : [false, false, false, false];

View File

@ -18,6 +18,13 @@ return new class extends Migration
Schema::table('companies', function (Blueprint $table){ Schema::table('companies', function (Blueprint $table){
$table->bigInteger('legal_entity_id')->nullable(); $table->bigInteger('legal_entity_id')->nullable();
}); });
if($currency = \App\Models\Currency::find(39))
{
$currency->symbol = 'лв';
$currency->save();
}
} }
/** /**

View File

@ -61,7 +61,7 @@ class CurrenciesSeeder extends Seeder
['id' => 36, 'name' => 'Trinidad and Tobago Dollar', 'code' => 'TTD', 'symbol' => 'TT$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 36, 'name' => 'Trinidad and Tobago Dollar', 'code' => 'TTD', 'symbol' => 'TT$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['id' => 37, 'name' => 'East Caribbean Dollar', 'code' => 'XCD', 'symbol' => 'EC$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 37, 'name' => 'East Caribbean Dollar', 'code' => 'XCD', 'symbol' => 'EC$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['id' => 38, 'name' => 'Ghanaian Cedi', 'code' => 'GHS', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 38, 'name' => 'Ghanaian Cedi', 'code' => 'GHS', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['id' => 39, 'name' => 'Bulgarian Lev', 'code' => 'BGN', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'], ['id' => 39, 'name' => 'Bulgarian Lev', 'code' => 'BGN', 'symbol' => 'лв', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'],
['id' => 40, 'name' => 'Aruban Florin', 'code' => 'AWG', 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'], ['id' => 40, 'name' => 'Aruban Florin', 'code' => 'AWG', 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'],
['id' => 41, 'name' => 'Turkish Lira', 'code' => 'TRY', 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','], ['id' => 41, 'name' => 'Turkish Lira', 'code' => 'TRY', 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','],
['id' => 42, 'name' => 'Romanian New Leu', 'code' => 'RON', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 42, 'name' => 'Romanian New Leu', 'code' => 'RON', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],

View File

@ -129,6 +129,8 @@ class FatturaPATest extends TestCase
$e = new EInvoice(); $e = new EInvoice();
$errors = $e->validate($fe); $errors = $e->validate($fe);
if(count($errors) > 0) { if(count($errors) > 0) {
nlog($errors); nlog($errors);
} }