Merge branch 'fronkdev' into 'master'
Address: Added manual_invoice_sepa_limit See merge request fronk/thetool!2018
This commit is contained in:
@@ -232,12 +232,22 @@
|
||||
<input type="text" class="form-control" name="bank_account_bic" id="bank_account_bic" value="<?=$address->bank_account_bic?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if($me->can("Fibu")): ?>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="bank_account_bic"></label>
|
||||
<label class="col-lg-2 col-form-label" for="manual_invoice_sepa_limit">Manuelle Rechnungen abbuchen bis (€)</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="manual_invoice_sepa_limit" id="manual_invoice_sepa_limit" value="<?=round($address->manual_invoice_sepa_limit, 2)?>" />
|
||||
<small>Wenn Bankeinzug aktiviert ist</small>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for=""></label>
|
||||
<div class="col-lg-10 alert alert-danger hidden" id="bank-error"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if($me->can("Fibu")): ?>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="sepa_date">Sepa Mandatsdatum</label>
|
||||
|
||||
@@ -146,6 +146,10 @@
|
||||
<td><?=$address->bank_account_bic?></td>
|
||||
</tr>
|
||||
<?php if($me->can("Fibu")): ?>
|
||||
<tr>
|
||||
<th>Manuelle Rechnungen abbuchen bis</th>
|
||||
<td><?=number_format($address->manual_invoice_sepa_limit, 2, ",", ".")?> €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sepa Mandatsdatum</th>
|
||||
<td><?=($address->sepa_date) ? date("d.m.Y", $address->sepa_date) : ""?></td>
|
||||
|
||||
@@ -333,6 +333,8 @@ class AddressController extends mfBaseController {
|
||||
$data['fibu_supplier_due'] = ($r->fibu_supplier_due) ? trim($r->fibu_supplier_due) : null;
|
||||
$data['fibu_supplier_skonto'] = ($r->fibu_supplier_skonto) ? trim($r->fibu_supplier_skonto) : null;
|
||||
$data['fibu_supplier_skonto_rate'] = ($r->fibu_supplier_skonto_rate) ? trim($r->fibu_supplier_skonto_rate) : null;
|
||||
|
||||
$data["manual_invoice_sepa_limit"] = ($r->manual_invoice_sepa_limit) ? str_replace(",", ".", trim($r->manual_invoice_sepa_limit)) : null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AddressAddManualInvoiceSepaLimit extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table('Address');
|
||||
$table->addColumn("manual_invoice_sepa_limit", "decimal", ["null" => true, "default" => 500, "precision" => 9, "scale" => 2, "after" => "fibu_payment_skonto_rate"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table('Address')->removeColumn("manual_invoice_sepa_limit")->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user