added 2 new columns to historicbill

This commit is contained in:
Luca Haid
2025-01-02 10:48:24 +01:00
parent 2a3ddf9a92
commit 04bc973160
3 changed files with 35 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ class HistoricBillController extends TTCrud {
['key' => 'address2', 'text' => 'Adresse 2', 'required' => true],
['key' => 'address3', 'text' => 'Adresse 3', 'required' => true],
['key' => 'address4', 'text' => 'Adresse 4', 'required' => true],
['key' => 'brutto_sum', 'text' => 'Brutto Summe', 'required' => true],
['key' => 'fibu_number', 'text' => 'FIBU', 'required' => true],
['key' => 'date_outgoing', 'text' => 'Ausgangsdatum', 'required' => true],
];
}

View File

@@ -14,6 +14,8 @@ class HistoricBillModel extends TTCrudBaseModel {
public string $accountnumber;
public string $BIC;
public string $IBAN;
public int $brutto_sum;
public string $fibu_number;
public string $Mandatinvoice_number;
public int $payment;
}

View File

@@ -0,0 +1,31 @@
<?php declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class HistoricbillModify extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("HistoricBill");
$table->addColumn("brutto_sum", "decimal", ["null" => true, "precision" => 10, "scale" => 4])
->update();
$table->addColumn("fibu_number", "string", ["null" => true, "limit" => 255])
->update();
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("HistoricBill");
$table->removeColumn("brutto_sum")
->update();
$table->removeColumn("fibu_number")
->update();
}
}
}