Add discounts, fields, and PDF/email support to manual invoices.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user