Add discounts, fields, and PDF/email support to manual invoices.

This commit is contained in:
2025-12-04 15:02:19 +01:00
parent 924f8c7f87
commit e310ae4bf8
13 changed files with 812 additions and 125 deletions
@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class UpdateManualinvoicepositionStructure extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("ManualInvoiceposition");
$table->addColumn("position_group", "string", ["null" => true, "default" => null, "length" => 255, "after" => "manualinvoice_id"]);
$table->removeColumn("start_date");
$table->removeColumn("end_date");
$table->removeColumn("billing_period");
$table->save();
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("ManualInvoiceposition");
$table->addColumn("start_date", "date", ["null" => false, "after" => "contract_id"]);
$table->addColumn("end_date", "date", ["null" => true, "default" => null, "after" => "start_date"]);
$table->addColumn("billing_period", "integer", ["null" => false, "default" => 0, "after" => "fibu_taxcode"]);
$table->removeColumn("position_group");
$table->save();
}
}
}