Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5d7a7cb5

Von Bernd Bleßmann vor etwa 1 Jahr hinzugefügt

  • ID 5d7a7cb5da29bf5ba69e1bff22a2a2620d989ee8
  • Vorgänger d9bb0bb9
  • Nachfolger fe66a56c

"Beleg ohne Positionen speichern erlauben" in Mandantenkonfig einstellbar

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
17 17
use SL::Locale::String qw(t8);
18 18
use SL::PriceSource::ALL;
19 19
use SL::Template;
20
use SL::Controller::DeliveryOrder;
21
use SL::Controller::Order;
22
use SL::Controller::Reclamation;
20 23
use SL::Controller::TopQuickSearch;
21 24
use SL::DB::Helper::AccountingPeriod qw(get_balance_startdate_method_options);
22 25
use SL::VATIDNr;
......
28 31
  'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates all_price_sources h_unit_name available_quick_search_modules
29 32
                                  all_project_statuses all_project_types zugferd_settings
30 33
                                  posting_options payment_options accounting_options inventory_options profit_options balance_startdate_method_options
31
                                  displayable_name_specs_by_module) ],
34
                                  displayable_name_specs_by_module available_documents_with_no_positions) ],
32 35
);
33 36

  
34 37
sub action_edit {
......
232 235
  };
233 236
}
234 237

  
238
sub init_available_documents_with_no_positions {
239
  return [] if !$::instance_conf->get_feature_experimental_order;
240

  
241
  my @docs = ( @{SL::Controller::Order        ->new->valid_types},
242
               @{SL::Controller::DeliveryOrder->new->valid_types},
243
               @{SL::Controller::Reclamation  ->new->valid_types} );
244

  
245
  # normal delivery orders are not yet handeld by new controller code
246
  @docs = grep { $_ ne 'sales_delivery_order' && $_ ne 'purchase_delivery_order' } @docs;
247

  
248
  # $::form->get_formname_translation does not distinguish between sales and purchase
249
  @docs = grep { $_ ne 'sales_reclamation' && $_ ne 'purchase_reclamation' } @docs;
250

  
251
  my @available_docs = map { {name => $_, description => $::form->get_formname_translation($_)} } @docs;
252

  
253
  push @available_docs, {name => 'sales_reclamation',    description => t8('Sales Reclamation')};
254
  push @available_docs, {name => 'purchase_reclamation', description => t8('Purchase Reclamation')};
255

  
256
  return \@available_docs;
257
}
258

  
235 259
#
236 260
# filters
237 261
#
SL/Controller/DeliveryOrder.pm
1661 1661
  my $errors = [];
1662 1662
  my $db     = $self->order->db;
1663 1663

  
1664
  if (scalar @{$self->order->items} == 0) {
1664
  if (scalar @{$self->order->items} == 0 && !grep { $self->type eq $_ } @{$::instance_conf->get_allowed_documents_with_no_positions() || []}) {
1665 1665
    return [t8('The action you\'ve chosen has not been executed because the document does not contain any item yet.')];
1666 1666
  }
1667 1667

  
SL/Controller/Order.pm
2188 2188
  my $errors = [];
2189 2189
  my $db     = $self->order->db;
2190 2190

  
2191
  if (scalar @{$self->order->items} == 0) {
2191
  if (scalar @{$self->order->items} == 0 && !grep { $self->type eq $_ } @{$::instance_conf->get_allowed_documents_with_no_positions() || []}) {
2192 2192
    return [t8('The action you\'ve chosen has not been executed because the document does not contain any item yet.')];
2193 2193
  }
2194 2194

  
SL/Controller/Reclamation.pm
1750 1750
  my $errors = [];
1751 1751
  my $db     = $self->reclamation->db;
1752 1752

  
1753
  if (scalar @{$self->reclamation->items} == 0) {
1753
  if (scalar @{$self->reclamation->items} == 0 && !grep { $self->type eq $_ } @{$::instance_conf->get_allowed_documents_with_no_positions() || []}) {
1754 1754
    return [t8('The action you\'ve chosen has not been executed because the document does not contain any item yet.')];
1755 1755
  }
1756 1756

  
SL/DB/MetaSetup/Default.pm
22 22
  allow_new_purchase_invoice                => { type => 'boolean', default => 'true', not_null => 1 },
23 23
  allow_sales_invoice_from_sales_order      => { type => 'boolean', default => 'true', not_null => 1 },
24 24
  allow_sales_invoice_from_sales_quotation  => { type => 'boolean', default => 'true', not_null => 1 },
25
  allowed_documents_with_no_positions       => { type => 'array' },
25 26
  always_record_links_from_order            => { type => 'boolean', default => 'false' },
26 27
  ap_add_doc                                => { type => 'boolean', default => 'false', not_null => 1 },
27 28
  ap_changeable                             => { type => 'integer', default => 2, not_null => 1 },
doc/changelog
39 39
  - Bei der Bearbeitung von VK-Angebote und VK-Aufträgen können die Emails aus
40 40
    den angelegten Ordner im Email-Server automatisch importiert werden (s.a.
41 41
    kivitendo.conf)
42
  - Belege ("neue" Controller, sprich Angebot/Auftrag/Beistelllieferschein/RMA/
43
    Reklamation) können nicht mehr ohne Positionen gespeichert werden. Ausnahmen
44
    lassen sich in der Mandantenkonfiguration einstellen.
42 45

  
43 46
2023-04-05 - Release 3.8.0
44 47

  
locale/de/all
1275 1275
  'Documentation about variables in a new window/tab' => 'Dokumentation zu Variablen in neuem Fenster/Tab',
1276 1276
  'Documents'                   => 'Dokumente',
1277 1277
  'Documents in the WebDAV repository' => 'Dokumente im WebDAV-Repository',
1278
  'Documents which are allowed to be saved with no positions' => 'Belege, die ohne Positionen gespeichert werden dürfen',
1278 1279
  'Don\'t include a printout of the record with the email' => 'Keinen Belegausdruck mit E-Mail schicken',
1279 1280
  'Don\'t include a printout of the record with the email, only selected files' => 'Keinen Belegausdruck mit E-Mail schicken, sondern nur ausgewählte Dateien',
1280 1281
  'Done'                        => 'Fertig',
locale/en/all
1275 1275
  'Documentation about variables in a new window/tab' => '',
1276 1276
  'Documents'                   => '',
1277 1277
  'Documents in the WebDAV repository' => '',
1278
  'Documents which are allowed to be saved with no positions' => '',
1278 1279
  'Don\'t include a printout of the record with the email' => '',
1279 1280
  'Don\'t include a printout of the record with the email, only selected files' => '',
1280 1281
  'Done'                        => '',
sql/Pg-upgrade2/defaults_allowed_documents_with_no_positions.sql
1
-- @tag: defaults_allowed_documents_with_no_positions
2
-- @description: Mandantenkonfiguration für Belege, die ohne Positionen gespeichert werden können
3
-- @depends: release_3_8_0
4

  
5
ALTER TABLE defaults ADD COLUMN allowed_documents_with_no_positions TEXT[];
templates/design40_webpages/client_config/_features.html
403 403
        <td>[% L.yes_no_tag("defaults.lock_oe_subversions", SELF.defaults.lock_oe_subversions) %]</td>
404 404
        <td class="long-desc">[% LxERP.t8("If enabled RFQs, Quotations and Orders can only be send once via email. By creating another subversion the current record gets a minor subversion and can be send again via email.") %]</td>
405 405
      </tr>
406
      <tr>
407
        <th>[% 'Documents which are allowed to be saved with no positions' | $T8 %]</th>
408
        <td colspan="2">
409
          <div>
410
            [% L.select_tag("defaults.allowed_documents_with_no_positions[]",
411
                            SELF.available_documents_with_no_positions,
412
                            default=SELF.defaults.allowed_documents_with_no_positions,
413
                            multiple=1,
414
                            with_empty=1,
415
                            value_key="name",
416
                            title_key="description",
417
                            id="defaults_allowed_documents_with_no_positions",
418
                            size=SELF.available_documents_with_no_positions.size+1) %]
419
          </div>
420
        </td>
421
      </tr>
406 422
      <tr>
407 423
        <th class="caption" colspan="3">[% LxERP.t8('Transport and service costs reminder') %]</th>
408 424
      </tr>
templates/webpages/client_config/_features.html
311 311
   <td>[% L.yes_no_tag("defaults.lock_oe_subversions", SELF.defaults.lock_oe_subversions) %]</td>
312 312
   <td>[% LxERP.t8("If enabled RFQs, Quotations and Orders can only be send once via email. By creating another subversion the current record gets a minor subversion and can be send again via email.") %]</td>
313 313
  </tr>
314
  <tr>
315
    <td align="right">[% 'Documents which are allowed to be saved with no positions' | $T8 %]</td>
316
    <td colspan=2>
317
      <div class="clearfix">
318
        [% L.select_tag("defaults.allowed_documents_with_no_positions[]",
319
                        SELF.available_documents_with_no_positions,
320
                        default=SELF.defaults.allowed_documents_with_no_positions,
321
                        multiple=1,
322
                        with_empty=1,
323
                        value_key="name",
324
                        title_key="description",
325
                        id="defaults_allowed_documents_with_no_positions",
326
                        size=SELF.available_documents_with_no_positions.size+1) %]
327
      </div>
328
    </td>
329
  </tr>
330

  
314 331
  <tr><td class="listheading" colspan="4">[% LxERP.t8("E-mail") %]</td></tr>
315 332

  
316 333
  <tr>

Auch abrufbar als: Unified diff