Revision b3259be1
Von Jan Büren vor fast 6 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
35 | 35 |
use SL::FU; |
36 | 36 |
use SL::IR; |
37 | 37 |
use SL::IS; |
38 |
use SL::DB::BankTransactionAccTrans; |
|
38 | 39 |
use SL::DB::Default; |
39 | 40 |
use SL::DB::Department; |
40 | 41 |
use SL::DB::PurchaseInvoice; |
... | ... | |
244 | 245 |
my $may_edit_create = $::auth->assert('vendor_invoice_edit', 1); |
245 | 246 |
|
246 | 247 |
my $has_sepa_exports; |
247 |
|
|
248 | 248 |
if ($form->{id}) { |
249 | 249 |
my $invoice = SL::DB::Manager::PurchaseInvoice->find_by(id => $form->{id}); |
250 | 250 |
$has_sepa_exports = 1 if ($invoice->find_sepa_export_items()->[0]); |
251 | 251 |
} |
252 | 252 |
|
253 |
my $is_linked_bank_transaction; |
|
254 |
if ($::form->{id} |
|
255 |
&& SL::DB::Default->get->payments_changeable != 0 |
|
256 |
&& SL::DB::Manager::BankTransactionAccTrans->find_by(ap_id => $::form->{id})) { |
|
257 |
|
|
258 |
$is_linked_bank_transaction = 1; |
|
259 |
} |
|
253 | 260 |
for my $bar ($::request->layout->get('actionbar')) { |
254 | 261 |
$bar->add( |
255 | 262 |
action => [ |
... | ... | |
272 | 279 |
: $form->{storno} ? t8('A canceled invoice cannot be posted.') |
273 | 280 |
: ($form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
274 | 281 |
: ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
282 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
275 | 283 |
: undef, |
276 | 284 |
], |
277 | 285 |
action => [ |
278 | 286 |
t8('Post Payment'), |
279 | 287 |
submit => [ '#form', { action => "post_payment" } ], |
280 | 288 |
checks => [ 'kivi.validate_form' ], |
281 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
282 |
: !$form->{id} ? t8('This invoice has not been posted yet.') |
|
283 |
: undef, |
|
289 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
290 |
: !$form->{id} ? t8('This invoice has not been posted yet.') |
|
291 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
292 |
: undef, |
|
284 | 293 |
], |
285 | 294 |
action => [ |
286 | 295 |
t8('Mark as paid'), |
... | ... | |
309 | 318 |
submit => [ '#form', { action => "delete" } ], |
310 | 319 |
checks => [ 'kivi.validate_form' ], |
311 | 320 |
confirm => t8('Do you really want to delete this object?'), |
312 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
313 |
: !$form->{id} ? t8('This invoice has not been posted yet.') |
|
314 |
: $form->{locked} ? t8('The billing period has already been locked.') |
|
315 |
: $change_never ? t8('Changing invoices has been disabled in the configuration.') |
|
316 |
: $change_on_same_day_only ? t8('Invoices can only be changed on the day they are posted.') |
|
317 |
: $has_sepa_exports ? t8('This invoice has been linked with a sepa export, undo this first.') |
|
318 |
: $has_storno ? t8('Can only delete the "Storno zu" part of the cancellation pair.') |
|
321 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
322 |
: !$form->{id} ? t8('This invoice has not been posted yet.') |
|
323 |
: $form->{locked} ? t8('The billing period has already been locked.') |
|
324 |
: $change_never ? t8('Changing invoices has been disabled in the configuration.') |
|
325 |
: $change_on_same_day_only ? t8('Invoices can only be changed on the day they are posted.') |
|
326 |
: $has_sepa_exports ? t8('This invoice has been linked with a sepa export, undo this first.') |
|
327 |
: $has_storno ? t8('Can only delete the "Storno zu" part of the cancellation pair.') |
|
328 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
319 | 329 |
: undef, |
320 | 330 |
], |
321 | 331 |
], # end of combobox "Storno" |
Auch abrufbar als: Unified diff
Manuelle Zahlungen verbieten, falls mit Kontoauszug verknüpft.
Falls die Änderbarkeit von Zahlungen nicht auf niemals steht,
entsprechend Überbuchen / manuelles Ändern verbieten.
Der Fehlertext weißt zusätzlich auf die Funktion im Bankbewegungs-Bericht hin