Billing changes

This commit is contained in:
Frank Schubert
2024-08-05 21:09:13 +02:00
parent 75f75b6327
commit a6389f014f
10 changed files with 357 additions and 149 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class InvoiceAddVatgroupId extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table('Invoice');
$table->addColumn("vatgroup_id", "integer", ["null" => false, "after" => "total_gross"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table('Invoice')->removeColumn("vatgroup_id")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}