Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4ac2976f

Von Bernd Bleßmann vor etwa 12 Jahren hinzugefügt

  • ID 4ac2976f86e7747ecf69a4e7b64f155343e984ae
  • Vorgänger 5175a512
  • Nachfolger 50c2f228

Änderbarkeit und Löschbarkeit von Belegen in Mandantenkonfiguration einstellbar.

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
12 12
sub action_edit {
13 13
  my ($self, %params) = @_;
14 14

  
15
  $self->{posting_options} = [ { title => $::locale->text("never"), value => 0 },
16
                               { title => $::locale->text("every time"), value => 1 },
17
                               { title => $::locale->text("on the same day"), value => 2 }, ];
15 18
  $self->{payment_options} = [ { title => $::locale->text("never"), value => 0 },
16 19
                               { title => $::locale->text("every time"), value => 1 },
17 20
                               { title => $::locale->text("on the same day"), value => 2 }, ];
......
22 25
  $self->{profit_options} = [ { title => $::locale->text("balance"), value => "balance" },
23 26
                              { title => $::locale->text("income"), value => "income" }, ];
24 27

  
28
  map { $self->{$_} = SL::DB::Default->get->$_ } qw(is_changeable ir_changeable ar_changeable ap_changeable gl_changeable);
29

  
25 30
  $self->{payments_changeable} = SL::DB::Default->get->payments_changeable;
26 31

  
27 32
  map { $self->{$_} = SL::DB::Default->get->$_ } qw(accounting_method inventory_system profit_determination);
......
41 46
sub action_save {
42 47
  my ($self, %params) = @_;
43 48

  
49
  map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(is_changeable ir_changeable ar_changeable ap_changeable gl_changeable);
50

  
44 51
  SL::DB::Default->get->update_attributes('payments_changeable' => $::form->{payments_changeable});
45 52

  
46 53
  map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(accounting_method inventory_system profit_determination);
SL/DB/MetaSetup/Default.pm
54 54
    datev_check_on_ar_transaction   => { type => 'boolean', default => 'true' },
55 55
    datev_check_on_ap_transaction   => { type => 'boolean', default => 'true' },
56 56
    datev_check_on_gl_transaction   => { type => 'boolean', default => 'true' },
57
    is_changeable                   => { type => 'integer', default => 2, not_null => 1 },
58
    ir_changeable                   => { type => 'integer', default => 2, not_null => 1 },
59
    ar_changeable                   => { type => 'integer', default => 2, not_null => 1 },
60
    ap_changeable                   => { type => 'integer', default => 2, not_null => 1 },
61
    gl_changeable                   => { type => 'integer', default => 2, not_null => 1 },
57 62
  ],
58 63

  
59 64
  primary_key_columns => [ 'id' ],
SL/InstanceConfiguration.pm
49 49
  return $self->{data}->{profit_determination};
50 50
}
51 51

  
52
sub get_is_changeable {
53
  my ($self) = @_;
54
  return $self->{data}->{is_changeable};
55
}
56

  
57
sub get_ir_changeable {
58
  my ($self) = @_;
59
  return $self->{data}->{ir_changeable};
60
}
61

  
62
sub get_ar_changeable {
63
  my ($self) = @_;
64
  return $self->{data}->{ar_changeable};
65
}
66

  
67
sub get_ap_changeable {
68
  my ($self) = @_;
69
  return $self->{data}->{ap_changeable};
70
}
71

  
72
sub get_gl_changeable {
73
  my ($self) = @_;
74
  return $self->{data}->{gl_changeable};
75
}
76

  
52 77
sub get_datev_check_on_sales_invoice {
53 78
  my ($self) = @_;
54 79
  return $self->{data}->{datev_check_on_sales_invoice};
......
131 156

  
132 157
Returns the default profit determination method, balance or income
133 158

  
159

  
160
=item C<get_is_changeable>
161

  
162
=item C<get_ir_changeable>
163

  
164
=item C<get_ar_changeable>
165

  
166
=item C<get_ap_changeable>
167

  
168
=item C<get_gl_changeable>
169

  
170
Returns if and when these record types are changeable or deleteable after
171
posting. 0 means never, 1 means always and 2 means on the same day.
172

  
134 173
=item C<get_datev_check_on_sales_invoice>
135 174

  
136 175
Returns true if datev check should be performed on sales invoices
bin/mozilla/ap.pl
239 239
  }
240 240
  my $readonly = ($form->{id}) ? "readonly" : "";
241 241

  
242
  $form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
242
  $form->{radier} = ($::instance_conf->get_ap_changeable == 2)
243
                      ? ($form->current_date(\%myconfig) eq $form->{gldate})
244
                      : ($::instance_conf->get_ap_changeable == 1);
243 245
  $readonly       = ($form->{radier}) ? "" : $readonly;
244 246

  
245 247
  $form->{forex}        = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'sell');
bin/mozilla/ar.pl
252 252
  #/show history button js
253 253
  $readonly = ($form->{id}) ? "readonly" : "";
254 254

  
255
  $form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
255
  $form->{radier} = ($::instance_conf->get_ar_changeable == 2)
256
                      ? ($form->current_date(\%myconfig) eq $form->{gldate})
257
                      : ($::instance_conf->get_ar_changeable == 1);
256 258
  $readonly = ($form->{radier}) ? "" : $readonly;
257 259

  
258 260
  # set option selected
bin/mozilla/gl.pl
903 903
    $follow_ups_due = sum map { $_->{due} * 1 } @{ $follow_ups || [] };
904 904
  }
905 905

  
906
  my $radieren = $::form->current_date(\%::myconfig) eq $::form->{gldate};
906
  my $radieren = ($::instance_conf->get_gl_changeable == 2)
907
                    ? ($::form->current_date(\%::myconfig) eq $::form->{gldate})
908
                    : ($::instance_conf->get_gl_changeable == 1);
907 909

  
908 910
  print $::form->parse_html_template('gl/form_footer', {
909 911
    radieren       => $radieren,
bin/mozilla/ir.pl
440 440
    totalpaid           => $totalpaid,
441 441
    paid_missing        => $form->{invtotal} - $totalpaid,
442 442
    show_storno         => $form->{id} && !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ap") && !$totalpaid,
443
    show_delete         => ($form->current_date(\%myconfig) eq $form->{gldate}),
443
    show_delete         => ($::instance_conf->get_ir_changeable == 2)
444
                             ? ($form->current_date(\%myconfig) eq $form->{gldate})
445
                             : ($::instance_conf->get_ir_changeable == 1),
444 446
  });
445 447
##print $form->parse_html_template('ir/_payments'); # parser
446 448
##print $form->parse_html_template('webdav/_list'); # parser
bin/mozilla/is.pl
472 472
    paid_missing        => $form->{invtotal} - $totalpaid,
473 473
    print_options       => print_options(inline => 1),
474 474
    show_storno         => $form->{id} && !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ar") && !$totalpaid,
475
    show_delete         => ($form->current_date(\%myconfig) eq $form->{gldate}),
475
    show_delete         => ($::instance_conf->get_is_changeable == 2)
476
                             ? ($form->current_date(\%myconfig) eq $form->{gldate})
477
                             : ($::instance_conf->get_is_changeable == 1),
476 478
  });
477 479
##print $form->parse_html_template('is/_payments'); # parser
478 480
##print $form->parse_html_template('webdav/_list'); # parser
locale/de/all
48 48
  'AP Transaction Storno (one letter abbreviation)' => 'S',
49 49
  'AP Transaction with Storno (abbreviation)' => 'K(S)',
50 50
  'AP Transactions'             => 'Kreditorenbuchungen',
51
  'AP transactions changeable'  => 'Änderbarkeit von Kreditorenbuchungen',
51 52
  'AP transactions with sales taxkeys and/or AR transactions with input taxkeys' => 'Kreditorenbuchungen mit Umsatzsteuer-Steuerschlüsseln und/oder Debitorenbuchungen mit Vorsteuer-Steuerschlüsseln',
52 53
  'AR'                          => 'Verkauf',
53 54
  'AR Aging'                    => 'Offene Forderungen',
54 55
  'AR Transaction'              => 'Debitorenbuchung',
55 56
  'AR Transaction (abbreviation)' => 'D',
56 57
  'AR Transactions'             => 'Debitorenbuchungen',
58
  'AR transactions changeable'  => 'Änderbarkeit von Debitorenbuchungen',
57 59
  'ASSETS'                      => 'AKTIVA',
58 60
  'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => 'ACHTUNG! Wenn Sie diese Einstellung aktivieren, dann können Sie sie später nicht ohne Weiteres deaktivieren, ohne dafür zu sorgen, dass die Felder der Mindeshaltbarkeitsdaten in der Datenbank leer gemacht werden.',
59 61
  'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => 'ACHTUNG! Es kann nicht ohne Weiteres im laufenden Betrieb von der Aufwandsmethode zur Bestandsmethode gewechselt werden.',
......
912 914
  'Full access to all functions' => 'Vollzugriff auf alle Funktionen',
913 915
  'Fwd'                         => 'Vorw&auml;rts',
914 916
  'GL Transaction'              => 'Dialogbuchung',
917
  'GL transactions changeable'  => 'Änderbarkeit von Dialogbuchungen',
915 918
  'Gegenkonto'                  => 'Gegenkonto',
916 919
  'Gender'                      => 'Geschlecht',
917 920
  'General Ledger'              => 'Finanzbuchhaltung',
......
1504 1507
  'Purchase Prices'             => 'Einkaufspreise',
1505 1508
  'Purchase delivery order'     => 'Lieferschein (Einkauf)',
1506 1509
  'Purchase invoices'           => 'Einkaufsrechnungen',
1510
  'Purchase invoices changeable' => 'Änderbarkeit von Einkaufsrechnunen',
1507 1511
  'Purchase net amount'         => 'EK-Betrag',
1508 1512
  'Purchase price'              => 'EK-Preis',
1509 1513
  'Purchase price total'        => 'EK-Betrag',
......
1611 1615
  'Sales delivery order'        => 'Lieferschein (Verkauf)',
1612 1616
  'Sales invoice number'        => 'Ausgangsrechnungsnummer',
1613 1617
  'Sales invoices'              => 'Verkaufsrechnungen',
1618
  'Sales invoices changeable'   => 'Änderbarkeit von Verkaufsrechnungen',
1614 1619
  'Sales margin'                => 'Marge',
1615 1620
  'Sales margin %'              => 'Marge prozentual',
1616 1621
  'Sales net amount'            => 'VK-Betrag',
......
1700 1705
  'Shipto is in use and was flagged invalid.' => 'Lieferadresse ist noch in Verwendung, und wurde als ungültig markiert.',
1701 1706
  'Shopartikel'                 => 'Shopartikel',
1702 1707
  'Short'                       => 'Knapp',
1708
  'Should ap transactions be and when should they be changeable or deleteable after posting?' => 'Sollen Kreditorenbuchungen nach der Buchung zu ändern oder zu löschen sein?',
1709
  'Should ar transactions be and when should they be changeable or deleteable after posting?' => 'Sollen Debitorenbuchungen nach der Buchung zu ändern oder zu löschen sein?',
1710
  'Should gl transactions be and when should they be changeable or deleteable after posting?' => 'Sollen Dialogbuchungen nach der Buchung zu ändern oder zu löschen sein?',
1703 1711
  'Should payments be and when should they be changeable after posting?' => 'Sollen Zahlungen nach dem Buchen änderbar sein, und wenn ja, wann?',
1712
  'Should purchase invoices be and when should they be deleteable after posting?' => 'Sollen Einkaufsrechnungen nach der Buchung zu löschen sein?',
1713
  'Should sales invoices be and when should they be changeable or deleteable after posting?' => 'Sollen Verkaufrechnung nach der Buchung zu ändern oder zu löschen sein?',
1704 1714
  'Show'                        => 'Zeigen',
1705 1715
  'Show Bestbefore'             => 'Mindesthaltbarkeit anzeigen',
1706 1716
  'Show Filter'                 => 'Filter zeigen',
locale/de_DE/all
48 48
  'AP Transaction Storno (one letter abbreviation)' => 'S',
49 49
  'AP Transaction with Storno (abbreviation)' => 'K(S)',
50 50
  'AP Transactions'             => 'Eingangsrechnungen',
51
  'AP transactions changeable'  => 'Änderbarkeit von Kreditorenbuchungen',
51 52
  'AP transactions with sales taxkeys and/or AR transactions with input taxkeys' => 'Kreditorenbuchungen mit Umsatzsteuer-Steuerschlüsseln und/oder Debitorenbuchungen mit Vorsteuer-Steuerschlüsseln',
52 53
  'AR'                          => 'Verkauf',
53 54
  'AR Aging'                    => 'Forderungen',
54 55
  'AR Transaction'              => 'Debitorenbuchung',
55 56
  'AR Transaction (abbreviation)' => 'D',
56 57
  'AR Transactions'             => 'Debitorenbuchungen',
58
  'AR transactions changeable'  => 'Änderbarkeit von Debitorenbuchungen',
57 59
  'ASSETS'                      => 'AKTIVA',
58 60
  'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => 'ACHTUNG! Wenn Sie diese Einstellung aktivieren, dann können Sie sie später nicht ohne Weiteres deaktivieren, ohne dafür zu sorgen, dass die Felder der Mindeshaltbarkeitsdaten in der Datenbank leer gemacht werden.',
59 61
  'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => 'ACHTUNG! Es kann nicht ohne Weiteres im laufenden Betrieb von der Aufwandsmethode zur Bestandsmethode gewechselt werden.',
......
880 882
  'Full access to all functions' => 'Vollzugriff auf alle Funktionen',
881 883
  'Fwd'                         => 'Vorw&auml;rts',
882 884
  'GL Transaction'              => 'Dialogbuchung',
885
  'GL transactions changeable'  => 'Änderbarkeit von Dialogbuchungen',
883 886
  'Gegenkonto'                  => 'Gegenkonto',
884 887
  'Gender'                      => 'Geschlecht',
885 888
  'General Ledger'              => 'Buchhaltung',
......
1467 1470
  'Purchase Prices'             => 'Einkaufspreise',
1468 1471
  'Purchase delivery order'     => 'Lieferschein (Einkauf)',
1469 1472
  'Purchase invoices'           => 'Einkaufsrechnungen',
1473
  'Purchase invoices changeable' => 'Änderbarkeit von Einkaufsrechnunen',
1470 1474
  'Purchase net amount'         => 'EK-Summe',
1471 1475
  'Purchase price'              => 'EK-Preis',
1472 1476
  'Purchase price total'        => 'EK-Summe',
......
1570 1574
  'Sales delivery order'        => 'Lieferschein (Verkauf)',
1571 1575
  'Sales invoice number'        => 'Ausgangsrechnungsnummer',
1572 1576
  'Sales invoices'              => 'Verkaufsrechnungen',
1577
  'Sales invoices changeable'   => 'Änderbarkeit von Verkaufsrechnungen',
1573 1578
  'Sales margin'                => 'Marge',
1574 1579
  'Sales margin %'              => 'Marge prozentual',
1575 1580
  'Sales net amount'            => 'VK-Netto',
......
1655 1660
  'Shipto is in use and was flagged invalid.' => 'Lieferadresse ist noch in Verwendung, und wurde als ungültig markiert.',
1656 1661
  'Shopartikel'                 => 'Shopartikel',
1657 1662
  'Short'                       => 'Knapp',
1663
  'Should ap transactions be and when should they be changeable or deleteable after posting?' => 'Sollen Kreditorenbuchungen nach der Buchung zu ändern oder zu löschen sein?',
1664
  'Should ar transactions be and when should they be changeable or deleteable after posting?' => 'Sollen Debitorenbuchungen nach der Buchung zu ändern oder zu löschen sein?',
1665
  'Should gl transactions be and when should they be changeable or deleteable after posting?' => 'Sollen Dialogbuchungen nach der Buchung zu ändern oder zu löschen sein?',
1658 1666
  'Should payments be and when should they be changeable after posting?' => 'Sollen Zahlungen nach dem Buchen änderbar sein, und wenn ja, wann?',
1667
  'Should purchase invoices be and when should they be deleteable after posting?' => 'Sollen Einkaufsrechnungen nach der Buchung zu löschen sein?',
1668
  'Should sales invoices be and when should they be changeable or deleteable after posting?' => 'Sollen Verkaufrechnung nach der Buchung zu ändern oder zu löschen sein?',
1659 1669
  'Show'                        => 'Zeigen',
1660 1670
  'Show Bestbefore'             => 'Mindesthaltbarkeit anzeigen',
1661 1671
  'Show Salesman'               => 'Verkäufer anzeigen',
locale/en/all
48 48
  'AP Transaction Storno (one letter abbreviation)' => '',
49 49
  'AP Transaction with Storno (abbreviation)' => '',
50 50
  'AP Transactions'             => 'Purchase Transactions',
51
  'AP transactions changeable'  => '',
51 52
  'AP transactions with sales taxkeys and/or AR transactions with input taxkeys' => '',
52 53
  'AR'                          => 'Sales',
53 54
  'AR Aging'                    => 'Debtor Aging',
54 55
  'AR Transaction'              => 'Sales Transaction',
55 56
  'AR Transaction (abbreviation)' => '',
56 57
  'AR Transactions'             => 'Sales Transactions',
58
  'AR transactions changeable'  => '',
57 59
  'ASSETS'                      => '',
58 60
  'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => '',
59 61
  'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => '',
......
895 897
  'Full access to all functions' => '',
896 898
  'Fwd'                         => 'Forward',
897 899
  'GL Transaction'              => '',
900
  'GL transactions changeable'  => '',
898 901
  'Gegenkonto'                  => '',
899 902
  'Gender'                      => '',
900 903
  'General Ledger'              => '',
......
1484 1487
  'Purchase Prices'             => '',
1485 1488
  'Purchase delivery order'     => '',
1486 1489
  'Purchase invoices'           => '',
1490
  'Purchase invoices changeable' => '',
1487 1491
  'Purchase net amount'         => '',
1488 1492
  'Purchase price'              => '',
1489 1493
  'Purchase price total'        => '',
......
1589 1593
  'Sales delivery order'        => '',
1590 1594
  'Sales invoice number'        => '',
1591 1595
  'Sales invoices'              => '',
1596
  'Sales invoices changeable'   => '',
1592 1597
  'Sales margin'                => '',
1593 1598
  'Sales margin %'              => '',
1594 1599
  'Sales net amount'            => '',
......
1677 1682
  'Shipto is in use and was flagged invalid.' => '',
1678 1683
  'Shopartikel'                 => '',
1679 1684
  'Short'                       => '',
1685
  'Should ap transactions be and when should they be changeable or deleteable after posting?' => '',
1686
  'Should ar transactions be and when should they be changeable or deleteable after posting?' => '',
1687
  'Should gl transactions be and when should they be changeable or deleteable after posting?' => '',
1680 1688
  'Should payments be and when should they be changeable after posting?' => '',
1689
  'Should purchase invoices be and when should they be deleteable after posting?' => '',
1690
  'Should sales invoices be and when should they be changeable or deleteable after posting?' => '',
1681 1691
  'Show'                        => '',
1682 1692
  'Show Bestbefore'             => '',
1683 1693
  'Show Filter'                 => '',
sql/Pg-upgrade2/defaults_posting_records_config.sql
1
-- @tag: defaults_posting_records_config
2
-- @description: Einstellung, ob und wann Belegbuchungen änderbar/löschbar sind.
3
-- @depends: release_2_7_0
4
-- @charset: utf-8
5

  
6
ALTER TABLE defaults ADD COLUMN is_changeable integer NOT NULL DEFAULT 2;
7
ALTER TABLE defaults ADD COLUMN ir_changeable integer NOT NULL DEFAULT 2;
8
ALTER TABLE defaults ADD COLUMN ar_changeable integer NOT NULL DEFAULT 2;
9
ALTER TABLE defaults ADD COLUMN ap_changeable integer NOT NULL DEFAULT 2;
10
ALTER TABLE defaults ADD COLUMN gl_changeable integer NOT NULL DEFAULT 2;
templates/webpages/client_config/form.html
11 11
 <tr class='listheading'>
12 12
   <th colspan="3">[% 'Posting Configuration' | $T8 %]</th>
13 13
 </tr>
14

  
15
 <tr>
16
   <td align="right">[% 'Sales invoices changeable' | $T8 %]</td>
17
   <td>[% L.select_tag('is_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.is_changeable) %]</td>
18
   <td>[% 'Should sales invoices be and when should they be changeable or deleteable after posting?' | $T8 %]</td>
19
 </tr>
20
 <tr>
21
   <td align="right">[% 'Purchase invoices changeable' | $T8 %]</td>
22
   <td>[% L.select_tag('ir_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.ir_changeable) %]</td>
23
   <td>[% 'Should purchase invoices be and when should they be deleteable after posting?' | $T8 %]</td>
24
 </tr>
25
 <tr>
26
   <td align="right">[% 'AR transactions changeable' | $T8 %]</td>
27
   <td>[% L.select_tag('ar_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.ar_changeable) %]</td>
28
   <td>[% 'Should ar transactions be and when should they be changeable or deleteable after posting?' | $T8 %]</td>
29
 </tr>
30
 <tr>
31
   <td align="right">[% 'AP transactions changeable' | $T8 %]</td>
32
   <td>[% L.select_tag('ap_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.ap_changeable) %]</td>
33
   <td>[% 'Should ap transactions be and when should they be changeable or deleteable after posting?' | $T8 %]</td>
34
 </tr>
35
 <tr>
36
   <td align="right">[% 'GL transactions changeable' | $T8 %]</td>
37
   <td>[% L.select_tag('gl_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.gl_changeable) %]</td>
38
   <td>[% 'Should gl transactions be and when should they be changeable or deleteable after posting?' | $T8 %]</td>
39
 </tr>
40

  
41
 <tr> </tr>
42
 <tr> </tr>
43

  
14 44
 <tr>
15 45
   <td align="right">[% 'Payments Changeable' | $T8 %]</td>
16 46
   <td>[% L.select_tag('payments_changeable', SELF.payment_options, value_key => 'value', title_key => 'title', default => SELF.payments_changeable) %]</td>
17 47
   <td>[% 'Should payments be and when should they be changeable after posting?' | $T8 %]</td>
18 48
 </tr>
49

  
50
 <tr> </tr>
51
 <tr> </tr>
52

  
19 53
 <tr>
20 54
   <td align="right">[% 'Accounting method' | $T8 %]</td>
21 55
   <td>[% L.select_tag('accounting_method', SELF.accounting_options, value_key => 'value', title_key => 'title', default => SELF.accounting_method) %]</td>

Auch abrufbar als: Unified diff