Revision b3259be1
Von Jan Büren vor fast 6 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
43 | 43 |
use SL::IR; |
44 | 44 |
use SL::IS; |
45 | 45 |
use SL::ReportGenerator; |
46 |
use SL::DB::BankTransactionAccTrans; |
|
46 | 47 |
use SL::DB::Currency; |
47 | 48 |
use SL::DB::Default; |
48 | 49 |
use SL::DB::PurchaseInvoice; |
... | ... | |
1231 | 1232 |
my $may_edit_create = $::auth->assert('vendor_invoice_edit', 1); |
1232 | 1233 |
|
1233 | 1234 |
my $has_sepa_exports; |
1234 |
|
|
1235 | 1235 |
if ($::form->{id}) { |
1236 | 1236 |
my $invoice = SL::DB::Manager::PurchaseInvoice->find_by(id => $::form->{id}); |
1237 | 1237 |
$has_sepa_exports = 1 if ($invoice->find_sepa_export_items()->[0]); |
1238 | 1238 |
} |
1239 | 1239 |
|
1240 |
my $is_linked_bank_transaction; |
|
1241 |
if ($::form->{id} |
|
1242 |
&& SL::DB::Default->get->payments_changeable != 0 |
|
1243 |
&& SL::DB::Manager::BankTransactionAccTrans->find_by(ap_id => $::form->{id})) { |
|
1244 |
|
|
1245 |
$is_linked_bank_transaction = 1; |
|
1246 |
} |
|
1247 |
|
|
1240 | 1248 |
for my $bar ($::request->layout->get('actionbar')) { |
1241 | 1249 |
$bar->add( |
1242 | 1250 |
action => [ |
... | ... | |
1258 | 1266 |
: $is_storno ? t8('A canceled invoice cannot be posted.') |
1259 | 1267 |
: ($::form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
1260 | 1268 |
: ($::form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
1269 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
1261 | 1270 |
: undef, |
1262 | 1271 |
], |
1263 | 1272 |
action => [ |
1264 | 1273 |
t8('Post Payment'), |
1265 | 1274 |
submit => [ '#form', { action => "post_payment" } ], |
1266 | 1275 |
checks => [ 'kivi.validate_form' ], |
1267 |
disabled => !$may_edit_create ? t8('You must not change this AP transaction.') |
|
1268 |
: !$::form->{id} ? t8('This invoice has not been posted yet.') |
|
1269 |
: undef, |
|
1276 |
disabled => !$may_edit_create ? t8('You must not change this AP transaction.') |
|
1277 |
: !$::form->{id} ? t8('This invoice has not been posted yet.') |
|
1278 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
1279 |
: undef, |
|
1270 | 1280 |
], |
1271 | 1281 |
action => [ t8('Mark as paid'), |
1272 | 1282 |
submit => [ '#form', { action => "mark_as_paid" } ], |
... | ... | |
1294 | 1304 |
action => [ t8('Delete'), |
1295 | 1305 |
submit => [ '#form', { action => "delete" } ], |
1296 | 1306 |
confirm => t8('Do you really want to delete this object?'), |
1297 |
disabled => !$may_edit_create ? t8('You must not change this AP transaction.') |
|
1298 |
: !$::form->{id} ? t8('This invoice has not been posted yet.') |
|
1299 |
: $change_never ? t8('Changing invoices has been disabled in the configuration.') |
|
1300 |
: $change_on_same_day_only ? t8('Invoices can only be changed on the day they are posted.') |
|
1301 |
: $has_storno ? t8('This invoice has been canceled already.') |
|
1302 |
: $is_closed ? t8('The billing period has already been locked.') |
|
1303 |
: $has_sepa_exports ? t8('This invoice has been linked with a sepa export, undo this first.') |
|
1304 |
: undef, |
|
1307 |
disabled => !$may_edit_create ? t8('You must not change this AP transaction.') |
|
1308 |
: !$::form->{id} ? t8('This invoice has not been posted yet.') |
|
1309 |
: $change_never ? t8('Changing invoices has been disabled in the configuration.') |
|
1310 |
: $change_on_same_day_only ? t8('Invoices can only be changed on the day they are posted.') |
|
1311 |
: $has_storno ? t8('This invoice has been canceled already.') |
|
1312 |
: $is_closed ? t8('The billing period has already been locked.') |
|
1313 |
: $has_sepa_exports ? t8('This invoice has been linked with a sepa export, undo this first.') |
|
1314 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
1315 |
: undef, |
|
1305 | 1316 |
], |
1306 | 1317 |
], # end of combobox "Storno" |
1307 | 1318 |
|
bin/mozilla/ar.pl | ||
---|---|---|
41 | 41 |
use SL::FU; |
42 | 42 |
use SL::GL; |
43 | 43 |
use SL::IS; |
44 |
use SL::DB::BankTransactionAccTrans; |
|
44 | 45 |
use SL::DB::Business; |
45 | 46 |
use SL::DB::Chart; |
46 | 47 |
use SL::DB::Currency; |
... | ... | |
1276 | 1277 |
my $has_storno = IS->has_storno(\%::myconfig, $::form, 'ar'); |
1277 | 1278 |
my $may_edit_create = $::auth->assert('ar_transactions', 1); |
1278 | 1279 |
|
1280 |
my $is_linked_bank_transaction; |
|
1281 |
if ($::form->{id} |
|
1282 |
&& SL::DB::Default->get->payments_changeable != 0 |
|
1283 |
&& SL::DB::Manager::BankTransactionAccTrans->find_by(ar_id => $::form->{id})) { |
|
1284 |
|
|
1285 |
$is_linked_bank_transaction = 1; |
|
1286 |
} |
|
1279 | 1287 |
for my $bar ($::request->layout->get('actionbar')) { |
1280 | 1288 |
$bar->add( |
1281 | 1289 |
action => [ |
... | ... | |
1297 | 1305 |
: $is_storno ? t8('A canceled invoice cannot be posted.') |
1298 | 1306 |
: ($::form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
1299 | 1307 |
: ($::form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
1308 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
1300 | 1309 |
: undef, |
1301 | 1310 |
], |
1302 | 1311 |
action => [ |
1303 | 1312 |
t8('Post Payment'), |
1304 | 1313 |
submit => [ '#form', { action => "post_payment" } ], |
1305 |
disabled => !$may_edit_create ? t8('You must not change this AR transaction.') |
|
1306 |
: !$::form->{id} ? t8('This invoice has not been posted yet.') |
|
1307 |
: undef, |
|
1314 |
disabled => !$may_edit_create ? t8('You must not change this AR transaction.') |
|
1315 |
: !$::form->{id} ? t8('This invoice has not been posted yet.') |
|
1316 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
1317 |
: undef, |
|
1308 | 1318 |
], |
1309 | 1319 |
action => [ t8('Mark as paid'), |
1310 | 1320 |
submit => [ '#form', { action => "mark_as_paid" } ], |
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" |
bin/mozilla/is.pl | ||
---|---|---|
43 | 43 |
use List::UtilsBy qw(sort_by); |
44 | 44 |
use English qw(-no_match_vars); |
45 | 45 |
|
46 |
use SL::DB::BankTransactionAccTrans; |
|
46 | 47 |
use SL::DB::Default; |
47 | 48 |
use SL::DB::Customer; |
48 | 49 |
use SL::DB::Department; |
... | ... | |
278 | 279 |
my $payments_balanced = ($::form->{oldtotalpaid} == 0); |
279 | 280 |
my $has_storno = ($::form->{storno} && !$::form->{storno_id}); |
280 | 281 |
my $may_edit_create = $::auth->assert('invoice_edit', 1); |
282 |
my $is_linked_bank_transaction; |
|
283 |
if ($::form->{id} |
|
284 |
&& SL::DB::Default->get->payments_changeable != 0 |
|
285 |
&& SL::DB::Manager::BankTransactionAccTrans->find_by(ar_id => $::form->{id})) { |
|
286 |
|
|
287 |
$is_linked_bank_transaction = 1; |
|
288 |
} |
|
281 | 289 |
|
282 | 290 |
for my $bar ($::request->layout->get('actionbar')) { |
283 | 291 |
$bar->add( |
... | ... | |
302 | 310 |
: $form->{storno} ? t8('A canceled invoice cannot be posted.') |
303 | 311 |
: ($form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
304 | 312 |
: ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
313 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
305 | 314 |
: undef, |
306 | 315 |
], |
307 | 316 |
action => [ |
308 | 317 |
t8('Post Payment'), |
309 | 318 |
submit => [ '#form', { action => "post_payment" } ], |
310 | 319 |
checks => [ 'kivi.validate_form' ], |
311 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
312 |
: !$form->{id} ? t8('This invoice has not been posted yet.') |
|
313 |
: undef, |
|
320 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
321 |
: !$form->{id} ? t8('This invoice has not been posted yet.') |
|
322 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
323 |
: undef, |
|
314 | 324 |
], |
315 | 325 |
action => [ t8('Mark as paid'), |
316 | 326 |
submit => [ '#form', { action => "mark_as_paid" } ], |
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