added 2 new columns to historicbill
This commit is contained in:
@@ -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],
|
||||
];
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
31
db/migrations/20250102100000_historicbill_modify.php
Normal file
31
db/migrations/20250102100000_historicbill_modify.php
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user