Revision 6c19cff0
Von Jan Büren vor etwa 6 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
1207 | 1207 |
my $is_storno = IS->is_storno(\%::myconfig, $::form, 'ap', $::form->{id}); |
1208 | 1208 |
my $has_storno = IS->has_storno(\%::myconfig, $::form, 'ap'); |
1209 | 1209 |
|
1210 |
my $has_sepa_exports; |
|
1211 |
|
|
1212 |
if ($::form->{id}) { |
|
1213 |
my $invoice = SL::DB::Manager::PurchaseInvoice->find_by(id => $::form->{id}); |
|
1214 |
$has_sepa_exports = 1 if ($invoice->find_sepa_export_items()->[0]); |
|
1215 |
} |
|
1216 |
|
|
1210 | 1217 |
for my $bar ($::request->layout->get('actionbar')) { |
1211 | 1218 |
$bar->add( |
1212 | 1219 |
action => [ |
... | ... | |
1251 | 1258 |
: $has_storno ? t8('This invoice has been canceled already.') |
1252 | 1259 |
: $is_storno ? t8('Reversal invoices cannot be canceled.') |
1253 | 1260 |
: $::form->{totalpaid} ? t8('Invoices with payments cannot be canceled.') |
1261 |
: $has_sepa_exports ? t8('This invoice has been linked with a sepa export, undo this first.') |
|
1254 | 1262 |
: undef, |
1255 | 1263 |
], |
1256 | 1264 |
action => [ t8('Delete'), |
... | ... | |
1261 | 1269 |
: $change_on_same_day_only ? t8('Invoices can only be changed on the day they are posted.') |
1262 | 1270 |
: $has_storno ? t8('This invoice has been canceled already.') |
1263 | 1271 |
: $is_closed ? t8('The billing period has already been locked.') |
1272 |
: $has_sepa_exports ? t8('This invoice has been linked with a sepa export, undo this first.') |
|
1264 | 1273 |
: undef, |
1265 | 1274 |
], |
1266 | 1275 |
], # end of combobox "Storno" |
Auch abrufbar als: Unified diff
SEPA verknüpfte Kreditorenbelege nicht stornieren/löschen
Wie in #b231d037 für Einkaufsrechnungen, gelten dieselben
Regeln bei Kreditorenbelegen. Changelog aktualisiert.