Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 67da170f

Von Cem Aydin vor fast 2 Jahren hinzugefügt

  • ID 67da170fe530eaba0c44a83ad8984dc95f4dd920
  • Vorgänger e51a208b
  • Nachfolger 3a2b956d

Bankkonto für die Nutzung mit dem Bankimport markieren

Bei den Bankkonten Auswahlmöglichkeit hinzugefügt, ob das Konto für den Bankimport verwendet werden soll.
(Standardwert und bestehende: Ja)
Notwendig, da es sein kann, dass Bankkonten für die QR-Rechnung aber nicht für den Bankimport genutzt werden. In dem Fall muss manuelles Buchen weiterhin möglich sein.

Unterschiede anzeigen:

SL/Controller/CsvImport/BankTransaction.pm
$object->local_bank_account_id($bank_account->id);
$entry->{info_data}->{local_bank_name} = $bank_account->name;
}
# Check if local bank account is marked for bank import
if ($object->local_bank_account_id && !$self->bank_accounts_by->{id}->{ $object->local_bank_account_id }->use_with_bank_import) {
push @{ $entry->{errors} }, $::locale->text('Error: local bank account is not marked for bank import, check settings under System -> Bank Accounts');
return 0;
}
return $object->local_bank_account_id ? 1 : 0;
}
SL/Controller/SimpleSystemSetting.pm
{ method => 'bank_code', title => t8('Bank code'), },
{ method => 'bank_account_id', title => t8('Bank Account Id Number (Swiss)'), },
{ method => 'bic', title => t8('BIC'), },
{ title => t8('Use with bank import'), formatter => sub { $_[0]->use_with_bank_import ? t8('yes') : t8('no') } },
{ title => t8('Use for Factur-X/ZUGFeRD'), formatter => sub { $_[0]->use_for_zugferd ? t8('yes') : t8('no') } },
{ title => t8('Use for Swiss QR-Bill'), formatter => sub { $_[0]->use_for_qrbill ? t8('yes') : t8('no') } },
{ method => 'reconciliation_starting_date_as_date', title => t8('Date'), align => 'right' },
bin/mozilla/ap.pl
my (%charts, %bank_accounts);
my $default_ap_amount_chart_id;
# don't add manual bookings for charts which are assigned to real bank accounts
# and are flagged for use with bank import
my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
foreach my $bank (@{ $bank_accounts }) {
my $accno_paid_bank = $bank->chart->accno;
$bank_accounts{$accno_paid_bank} = 1;
if ($bank->use_with_bank_import) {
my $accno_paid_bank = $bank->chart->accno;
$bank_accounts{$accno_paid_bank} = 1;
}
}
foreach my $item (@{ $form->{ALL_CHARTS} }) {
bin/mozilla/ar.pl
my (@AR_paid_values, %AR_paid_labels, %bank_accounts);
my $default_ar_amount_chart_id;
# don't add manual bookings for charts which are assigned to real bank accounts
# and are flagged for use with bank import
my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
foreach my $bank (@{ $bank_accounts }) {
my $accno_paid_bank = $bank->chart->accno;
$bank_accounts{$accno_paid_bank} = 1;
if ($bank->use_with_bank_import) {
my $accno_paid_bank = $bank->chart->accno;
$bank_accounts{$accno_paid_bank} = 1;
}
}
foreach my $item (@{ $form->{ALL_CHARTS} }) {
if ($item->{link_split}{AR_amount}) {
bin/mozilla/ir.pl
$form->{"changeable_$i"} = 0;
}
# don't add manual bookings for charts which are assigned to real bank accounts
# and are flagged for use with bank import
my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
foreach my $bank (@{ $bank_accounts }) {
my $accno_paid_bank = $bank->chart->accno;
$form->{selectAP_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//;
if ($bank->use_with_bank_import) {
my $accno_paid_bank = $bank->chart->accno;
$form->{selectAP_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//;
}
}
$form->{"selectAP_paid_$i"} = $form->{selectAP_paid};
if (!$form->{"AP_paid_$i"}) {
bin/mozilla/is.pl
$form->{"changeable_$i"} = 0;
}
# don't add manual bookings for charts which are assigned to real bank accounts
# and are flagged for use with bank import
my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
foreach my $bank (@{ $bank_accounts }) {
my $accno_paid_bank = $bank->chart->accno;
$form->{selectAR_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//;
if ($bank->use_with_bank_import) {
my $accno_paid_bank = $bank->chart->accno;
$form->{selectAR_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//;
}
}
$form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
doc/changelog
Kleinere neue Features und Detailverbesserungen:
- Bei den Bankkonten Auswahlmöglichkeit hinzugefügt, ob das Konto für den Bankimport
verwendet (und somit für manuelle buchungen gesperrt) werden soll
(Standardwert und bestehende: Ja)
- Mahnsperre beim Kunden
- Bei Mahnungen den schon erstellten Beleg mitversenden (Optional einstellbar in der
Mahnunskonfiguration.
templates/design40_webpages/simple_system_setting/_bank_account_form.html
<td>[% P.chart.picker("object.chart_id", SELF.object.chart_id, type='AR_paid,AP_paid', category='A,L,Q', choose=1, class='wi-wider', "data-validate"="required", "data-title"=LxERP.t8("Chart")) %]</td>
</tr>
<tr>
<th></th>
<td>[% LxERP.t8('This chart cannot be booked manually after assigning it to a real bank account.') %]</td>
<th>[% LxERP.t8('Use with bank import') %]</th>
<td>
[% L.checkbox_tag('object.use_with_bank_import', checked = SELF.object.use_with_bank_import, for_submit=1) %]
<br>
<strong>[% LxERP.t8('Warning') %]:</strong> [% LxERP.t8('If this option is disabled, the bank import is not possible for this account anymore. In the case of invoices and accounts payable and receivable entries, incoming and outgoing payments can then be posted directly to the account manually.') %]
</td>
</tr>
<tr>
<th>[% LxERP.t8('Use for Factur-X/ZUGFeRD') %]</th>
templates/webpages/simple_system_setting/_bank_account_form.html
<td>[% P.chart.picker('object.chart_id', SELF.object.chart_id, type='AR_paid,AP_paid', category='A,L,Q', choose=1, style=style, "data-validate"="required", "data-title"=LxERP.t8("Chart")) %]</td>
</tr>
<tr>
<th align="right">[% LxERP.t8('Note') %]</th><td>[% LxERP.t8('This chart cannot be booked manually after assigning it to a real bank account.') %]</td>
</tr>
<th align="right">[% LxERP.t8('Use with bank import') %]</th>
<td>
[% L.checkbox_tag('object.use_with_bank_import', checked = SELF.object.use_with_bank_import, for_submit=1) %]
<strong>[% LxERP.t8('Warning') %]:</strong> [% LxERP.t8('If this option is disabled, the bank import is not possible for this account anymore. In the case of invoices and accounts payable and receivable entries, incoming and outgoing payments can then be posted directly to the account manually.') %]
</td>
</tr>
<tr>
<th align="right">[% LxERP.t8('Use for Factur-X/ZUGFeRD') %]</th>
<td>[% L.checkbox_tag('object.use_for_zugferd', checked = SELF.object.use_for_zugferd, for_submit=1) %]</td>

Auch abrufbar als: Unified diff