Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 833f083e

Von Jan Büren vor mehr als 9 Jahren hinzugefügt

  • ID 833f083eae2a4547c49f8f92a2fdca6ba4dfe5f4
  • Vorgänger c4504ef1
  • Nachfolger 3171c378

Konfigurierbares Angebotsgültigkeits-Intervall hinzugefügt
Standardmässig ist ein Verkaufsangebot bis zum nächsten Werktag gültig.
Dieses Intervall wird dann noch hinzugerechnet, bspw. nächster Werktag plus 14, 28 etc.
Falls das Intervall nicht gesetzt oder wir nicht den Typ sales_quotation haben, passiert nichts.
Der Datentyp ist Integer, Tippfehler werden bisher nur dort abgefangen (Wird wahrscheinlich
nur einmalig von einem Kunden gesetzt).

Unterschiede anzeigen:

SL/DB/MetaSetup/Default.pm
72 72
  profit_determination                     => { type => 'text' },
73 73
  purchase_delivery_order_show_delete      => { type => 'boolean', default => 'true' },
74 74
  purchase_order_show_delete               => { type => 'boolean', default => 'true' },
75
  reqdate_interval                         => { type => 'integer', default => '0' },
75 76
  require_transaction_description_ps       => { type => 'boolean', default => 'false', not_null => 1 },
76 77
  requirement_spec_section_order_part_id   => { type => 'integer' },
77 78
  revtrans                                 => { type => 'boolean', default => 'false' },
SL/OE.pm
795 795
  if (!$form->{id}) {
796 796
    my $wday         = (localtime(time))[6];
797 797
    my $next_workday = $wday == 5 ? 3 : $wday == 6 ? 2 : 1;
798

  
799
    # if we have a client configured interval for sales quotation, we add this
800
    $next_workday   += $::instance_conf->get_reqdate_interval if ($::instance_conf->get_reqdate_interval &&
801
                                                                    $form->{type} eq 'sales_quotation' );
802

  
798 803
    $query_add       = qq|, current_date AS transdate, date(current_date + interval '${next_workday} days') AS reqdate|;
799 804
  }
800 805

  
bin/mozilla/oe.pl
240 240
  # get customer/vendor
241 241
  $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP");
242 242

  
243
  # retrieve order/quotation
243
  # retrieve order/quotation and webdav config
244 244
  $form->{webdav}   = $::instance_conf->get_webdav;
245 245

  
246 246
  my $editing = $form->{id};
......
1629 1629
      my $wday         = (localtime(time))[6];
1630 1630
      my $next_workday = $wday == 5 ? 3 : $wday == 6 ? 2 : 1;
1631 1631

  
1632
      # if we have a client configured interval for sales quotation, we add this
1633
      $next_workday   += $::instance_conf->get_reqdate_interval if ($::instance_conf->get_reqdate_interval &&
1634
                                                                    $form->{type} eq 'sales_quotation'       );
1635

  
1632 1636
      my $query = 'SELECT
1633 1637
                     date(current_date + interval \''. $next_workday .' days\') AS reqdate,
1634 1638
                     date(current_date) AS transdate';
locale/de/all
2033 2033
  'Sales Orders'                => 'Aufträge',
2034 2034
  'Sales Orders deleteable'     => 'Kundenaufträge löschbar',
2035 2035
  'Sales Price information'     => 'Verkaufspreisinformation',
2036
  'Sales Quotation valid interval' => 'Angebotsgültigkeitsintervall',
2036 2037
  'Sales Quotations'            => 'Angebote',
2037 2038
  'Sales Report'                => 'Verkaufsbericht',
2038 2039
  'Sales and purchase invoices with inventory transactions with taxkeys' => 'Einkaufs- und Verkaufsrechnungen mit Warenbestandsbuchungen mit Steuerschlüsseln',
......
2763 2764
  'Updating the client fields in the database "#1" on host "#2:#3" failed.' => 'Die Aktualisierung der Mandantenfelder in der Datenbank "#1" auf Host "#2:#3" schlug fehl.',
2764 2765
  'Uploaded at'                 => 'Hochgeladen um',
2765 2766
  'Uploaded on #1, size #2 kB'  => 'Am #1 hochgeladen, Größe #2 kB',
2767
  'Usally the sales quotation is valid until the next working day. This entry will be added to this date (i.e. 14, 28).' => 'Standardmässig ist ein Verkaufsangebot bis zum nächsten Werktag gültig. Dieses Intervall wird dann noch hinzugerechnet, bspw. nächster Werktag plus 14, 28 etc.',
2766 2768
  'Use As New'                  => 'Als neu verwenden',
2767 2769
  'Use WebDAV Repository'       => 'WebDAV-Ablage verwenden',
2768 2770
  'Use existing templates'      => 'Vorhandene Druckvorlagen verwenden',
sql/Pg-upgrade2/defaults_reqdate_interval.pl
1
# @tag: defaults_reqdate_interval
2
# @description: Einstellen der Angebotsgültigkeit per Intervall (z.B.: +28 Tage)
3
# @depends: release_3_1_0
4
package SL::DBUpgrade2::defaults_reqdate_interval;
5

  
6
use utf8;
7

  
8
use parent qw(SL::DBUpgrade2::Base);
9
use strict;
10

  
11
sub run {
12
  my ($self) = @_;
13

  
14
  # this query will fail if column already exist (new database)
15
  $self->db_query(qq|ALTER TABLE defaults ADD COLUMN reqdate_interval integer DEFAULT 0|);
16
  return 1;
17
}
18

  
19
1;
templates/webpages/client_config/_posting_configuration.html
86 86
   <td>[% L.select_tag('defaults.balance_startdate_method', SELF.balance_startdate_method_options, value_key = 'value', title_key = 'title', default = SELF.defaults.balance_startdate_method) %]</td>
87 87
   <td>[% LxERP.t8('This option controls the method used for determining the startdate for the balance report.') %]</td>
88 88
  </tr>
89
  <tr>
90
   <td align="right">[% LxERP.t8('Sales Quotation valid interval') %]</td>
91
   <td>[% L.input_tag('defaults.reqdate_interval', LxERP.format_amount(SELF.defaults.reqdate_interval, 0), style=style) %]</td>
92
   <td>[% LxERP.t8('Usally the sales quotation is valid until the next working day. This entry will be added to this date (i.e. 14, 28).') %]</td>
93
  </tr>
89 94
 </table>
90 95
</div>

Auch abrufbar als: Unified diff