Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision bde667c2

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID bde667c235b2347bdd1322f118b032a2f0d93367
  • Vorgänger 7e57b1fe
  • Nachfolger ad091a4e

Einkaufs-, Verkaufs-, Debitoren- und Kreditorenrechnungen können als Entwurf gespeichert und später weiter bearbeitet werden. Dabei werden sie nicht gebucht.

Unterschiede anzeigen:

SL/Drafts.pm
1
#======================================================================
2
# LX-Office ERP
3
#
4
#======================================================================
5
#
6
# Saving and loading drafts
7
#
8
#======================================================================
9

  
10
package Drafts;
11

  
12
use YAML;
13

  
14
use SL::Common;
15
use SL::DBUtils;
16

  
17
sub get_module {
18
  $main::lxdebug->enter_sub();
19

  
20
  my ($self, $form) = @_;
21

  
22
  my ($module, $submodule);
23

  
24
  $module = $form->{"script"};
25
  $module =~ s/\.pl$//;
26
  if (grep({ $module eq $_ } qw(is ir ar ap))) {
27
    $submodule = "invoice";
28
  } else {
29
    $submodule = "unknown";
30
  }
31

  
32
  $main::lxdebug->leave_sub();
33

  
34
  return ($module, $submodule);
35
}
36

  
37
sub save {
38
  $main::lxdebug->enter_sub();
39

  
40
  my ($self, $myconfig, $form, $draft_id, $draft_description) = @_;
41

  
42
  my ($dbh, $sth, $query, %saved, @dont_save, $dumped);
43

  
44
  $dbh = $form->dbconnect_noauto($myconfig);
45

  
46
  my ($module, $submodule) = $self->get_module($form);
47

  
48
  $query = "SELECT COUNT(*) FROM drafts WHERE id = ?";
49
  my ($res) = selectrow_query($form, $dbh, $query, $draft_id);
50
  if (!$res) {
51
    $draft_id = $module . "-" . $submodule . "-" . Common::unique_id();
52
    $query = "INSERT INTO drafts (id, module, submodule) VALUES (?, ?, ?)";
53
    do_query($form, $dbh, $query, $draft_id, $module, $submodule);
54
  }
55

  
56
  @dont_save = qw(login password path action);
57
  map({ $saved{$_} = $form->{$_};
58
        delete($form->{$_}); } @dont_save);
59
  $dumped = YAML::Dump($form);
60
  map({ $form->{$_} = $saved{$_}; } @dont_save);
61

  
62
  $query =
63
    qq|UPDATE drafts SET description = ?, form = ?, employee_id = | .
64
    qq|  (SELECT id FROM employee WHERE login = ?) | .
65
    qq|WHERE id = ?|;
66

  
67
  do_query($form, $dbh, $query, $draft_description, $dumped,
68
           $form->{login}, $draft_id);
69

  
70
  $dbh->commit();
71
  $dbh->disconnect();
72

  
73
  $form->{draft_id} = $draft_id;
74
  $form->{draft_description} = $draft_description;
75

  
76
  $main::lxdebug->leave_sub();
77
}
78

  
79
sub load {
80
  $main::lxdebug->enter_sub();
81

  
82
  my ($self, $myconfig, $form, $draft_id) = @_;
83

  
84
  my ($dbh, $sth, $query, @values);
85

  
86
  $dbh = $form->dbconnect($myconfig);
87

  
88
  $query = qq|SELECT id, description, form FROM drafts WHERE id = ?|;
89

  
90
  $sth = $dbh->prepare($query);
91
  $sth->execute($draft_id) || $form->dberror("$query ($draft_id)");
92

  
93
  my @values;
94
  if (my $ref = $sth->fetchrow_hashref()) {
95
    @values = ($ref->{form}, $ref->{id}, $ref->{description});
96
  }
97
  $sth->finish();
98

  
99
  do_query($form, $dbh, "DELETE FROM drafts WHERE id = ?", $draft_id);
100

  
101
  $dbh->disconnect();
102

  
103
  $main::lxdebug->leave_sub();
104

  
105
  return @values;
106
}
107

  
108
sub remove {
109
  $main::lxdebug->enter_sub();
110

  
111
  my ($self, $myconfig, $form, $draft_id) = @_;
112

  
113
  return $main::lxdebug->leave_sub() unless ($draft_id);
114

  
115
  my ($dbh, $sth, $query, @values);
116

  
117
  $dbh = $form->dbconnect($myconfig);
118

  
119
  $query = qq|DELETE FROM drafts WHERE id = ?|;
120
  do_query($form, $dbh, $query, $draft_id);
121

  
122
  $dbh->disconnect();
123

  
124
  $main::lxdebug->leave_sub();
125
}
126

  
127
sub list {
128
  $main::lxdebug->enter_sub();
129

  
130
  my ($self, $myconfig, $form) = @_;
131

  
132
  my ($dbh, $sth, $query, @values);
133

  
134
  $dbh = $form->dbconnect($myconfig);
135

  
136
  my ($module, $submodule) = $self->get_module($form);
137

  
138
  my @list = ();
139
  $query =
140
    qq|SELECT d.id, d.description, d.itime::timestamp(0) AS itime, | .
141
    qq|  e.name AS employee_name | .
142
    qq|FROM drafts d | .
143
    qq|LEFT JOIN employee e ON d.employee_id = e.id | .
144
    qq|WHERE (d.module = ?) AND (d.submodule = ?) | .
145
    qq|ORDER BY d.itime|;
146
  my @values = ($module, $submodule);
147

  
148
  $sth = $dbh->prepare($query);
149
  $sth->execute(@values) ||
150
    $form->dberror($query . " (" . join(", ", @values) . ")");
151

  
152
  while (my $ref = $sth->fetchrow_hashref()) {
153
    push(@list, $ref);
154
  }
155
  $sth->finish();
156

  
157
  $dbh->disconnect();
158

  
159
  $main::lxdebug->leave_sub();
160

  
161
  return @list;
162
}
163

  
164
1;
bin/mozilla/ap.pl
37 37

  
38 38
require "$form->{path}/arap.pl";
39 39
require "bin/mozilla/common.pl";
40
require "bin/mozilla/drafts.pl";
40 41

  
41 42
1;
42 43

  
......
73 74
sub add {
74 75
  $lxdebug->enter_sub();
75 76

  
77
  return $lxdebug->leave_sub() if (load_draft_maybe());
78

  
76 79
  $form->{title} = "Add";
77 80

  
78 81
  $form->{callback} =
......
459 462
<input type=hidden name=locked value=$form->{locked}>
460 463
<input type=hidden name=title value="$title">
461 464

  
465
| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq|
466

  
462 467
<table width=100%>
463 468
  <tr class=listtop>
464 469
    <th class=listtop>$form->{title}</th>
......
757 762
<input type=hidden name=path value=$form->{path}>
758 763
<input type=hidden name=login value=$form->{login}>
759 764
<input type=hidden name=password value=$form->{password}>
765
|
766
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
767
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
768
. qq|
760 769

  
761 770
<br>
762 771
|;
......
789 798
  } elsif (($transdate > $closedto) && !$form->{id}) {
790 799
    print qq|
791 800
      <input class=submit type=submit name=action value="|
792
      . $locale->text('Post') . qq|">|;
801
      . $locale->text('Post') . qq|"> | .
802
      NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
803
                       '-class' => 'submit'));
793 804
  }
794 805
  # button for saving history
795 806
  if($form->{id} ne "") {
......
1000 1011
  $form->{taxkey}       = $taxkey;
1001 1012

  
1002 1013
  $form->{id} = 0 if $form->{postasnew};
1003
  # saving the history
1004
  if(!exists $form->{addition} && $form->{id} ne "") {
1005
  	$form->{addition} = "POSTED";
1006
  	$form->save_history($form->dbconnect(\%myconfig));
1007
  }
1008
  # /saving the history 
1009 1014

  
1010
  $form->redirect($locale->text('Transaction posted!'))
1011
    if (AP->post_transaction(\%myconfig, \%$form));
1015
  if (AP->post_transaction(\%myconfig, \%$form)) {
1016
    # saving the history
1017
    if(!exists $form->{addition} && $form->{id} ne "") {
1018
      $form->{addition} = "POSTED";
1019
      $form->save_history($form->dbconnect(\%myconfig));
1020
    }
1021
    # /saving the history 
1022
    remove_draft();
1023
    $form->redirect($locale->text('Transaction posted!'));
1024
  }
1012 1025
  $form->error($locale->text('Cannot post transaction!'));
1013 1026

  
1014 1027
  $lxdebug->leave_sub();
bin/mozilla/ar.pl
38 38

  
39 39
require "$form->{path}/arap.pl";
40 40
require "bin/mozilla/common.pl";
41
require "bin/mozilla/drafts.pl";
41 42

  
42 43
1;
43 44

  
......
73 74

  
74 75
sub add {
75 76
  $lxdebug->enter_sub();
76
  
77

  
78
  return $lxdebug->leave_sub() if (load_draft_maybe());
79

  
77 80
  # saving the history
78 81
  if(!exists $form->{addition} && ($form->{id} ne "")) {
79 82
  	$form->{addition} = "ADDED";
......
494 497
<input type=hidden name=locked value=$form->{locked}>
495 498
<input type=hidden name=title value="$title">
496 499

  
500
| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq|
501

  
497 502
<table width=100%>
498 503
  <tr class=listtop>
499 504
    <th class=listtop>$form->{title}</th>
......
789 794
<input type=hidden name=path value=$form->{path}>
790 795
<input type=hidden name=login value=$form->{login}>
791 796
<input type=hidden name=password value=$form->{password}>
797
|
798
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
799
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
800
. qq|
792 801

  
793 802
<br>
794 803
|;
......
822 831
  } else {
823 832
    if ($transdate > $closedto) {
824 833
      print qq|<input class=submit type=submit name=action value="|
825
        . $locale->text('Post') . qq|">|;
834
        . $locale->text('Post') . qq|"> | .
835
        NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
836
                         '-class' => 'submit'));
826 837
    }
827 838
  }
828 839

  
......
1049 1060
  	  $form->save_history($form->dbconnect(\%myconfig));
1050 1061
    }
1051 1062
    # /saving the history 
1063
    remove_draft();
1052 1064
    $form->redirect($locale->text('Transaction posted!'));
1053 1065
  }
1054 1066
  $form->error($locale->text('Cannot post transaction!'));
bin/mozilla/common.pl
38 38
  $old_form =~ s|!r|\r|g;
39 39
  $old_form =~ s|!n|\n|g;
40 40
  $old_form =~ s|!!|!|g;
41
  $form = YAML::Load($old_form);
41
  my $new_form = YAML::Load($old_form);
42
  map({ $form->{$_} = $new_form->{$_}; } keys(%{$new_form}));
42 43

  
43 44
  $lxdebug->leave_sub();
44 45
}
bin/mozilla/drafts.pl
1
#======================================================================
2
# LX-Office ERP
3
#
4
#======================================================================
5
#
6
# Saving and loading drafts
7
#
8
#======================================================================
9

  
10
use SL::Drafts;
11

  
12
require "bin/mozilla/common.pl";
13

  
14
sub save_draft {
15
  $lxdebug->enter_sub();
16

  
17
  if (!$form->{draft_id} && !$form->{draft_description}) {
18
    restore_form($form->{SAVED_FORM}, 1) if ($form->{SAVED_FORM});
19
    $form->{SAVED_FORM} = save_form();
20

  
21
    $form->header();
22
    print($form->parse_html_template("drafts/save_new"));
23
    return $lxdebug->leave_sub();
24
  }
25

  
26
  my ($draft_id, $draft_description) =
27
    ($form->{draft_id}, $form->{draft_description});
28

  
29
  restore_form($form->{SAVED_FORM}, 1);
30
  delete($form->{SAVED_FORM});
31

  
32
  Drafts->save(\%myconfig, $form, $draft_id, $draft_description);
33

  
34
  $form->{saved_message} = $locale->text("Draft saved.");
35

  
36
  update();
37

  
38
  $lxdebug->leave_sub();
39
}
40

  
41
sub remove_draft {
42
  $lxdebug->enter_sub();
43

  
44
  Drafts->remove(\%myconfig, $form, $form->{draft_id}) if ($form->{draft_id});
45

  
46
  delete($form->{draft_id});
47
  delete($form->{draft_description});
48

  
49
  $lxdebug->leave_sub();
50
}
51

  
52
sub load_draft_maybe {
53
  $lxdebug->enter_sub();
54

  
55
  $lxdebug->leave_sub() and return 0 if ($form->{DONT_LOAD_DRAFT});
56

  
57
  my ($draft_nextsub) = @_;
58

  
59
  my @drafts = Drafts->list(\%myconfig, $form);
60

  
61
  $lxdebug->leave_sub() and return 0 unless (@drafts);
62

  
63
  $draft_nextsub = "add" unless ($draft_nextsub);
64

  
65
  delete($form->{action});
66
  my $saved_form = save_form();
67

  
68
  $form->header();
69
  print($form->parse_html_template("drafts/load",
70
                                   { "DRAFTS" => \@drafts,
71
                                     "SAVED_FORM" => $saved_form,
72
                                     "draft_nextsub" => $draft_nextsub }));
73

  
74
  $lxdebug->leave_sub();
75

  
76
  return 1;
77
}
78

  
79
sub dont_load_draft {
80
  $lxdebug->enter_sub();
81

  
82
  my $draft_nextsub = $form->{draft_nextsub};
83
  $draft_nextsub = "add" unless ($form->{draft_nextsub});
84
  restore_form($form->{SAVED_FORM}, 1);
85
  delete($form->{action});
86
  $form->{DONT_LOAD_DRAFT} = 1;
87

  
88
  &{ $draft_nextsub }();
89

  
90
  $lxdebug->leave_sub();
91
}
92

  
93
sub load_draft {
94
  $lxdebug->enter_sub();
95

  
96
  my ($old_form, $id, $description) = Drafts->load(\%myconfig, $form, $form->{id});
97
  if ($old_form) {
98
    restore_form($old_form, 1);
99
    $form->{draft_id} = $id;
100
    $form->{draft_description} = $description;
101
    $lxdebug->dump(0, "of", $old_form);
102
  }
103

  
104
  update();
105

  
106
  $lxdebug->leave_sub();
107
}
108

  
109
1;
bin/mozilla/ir.pl
37 37
require "$form->{path}/io.pl";
38 38
require "$form->{path}/arap.pl";
39 39
require "$form->{path}/common.pl";
40
require "bin/mozilla/drafts.pl";
40 41

  
41 42
1;
42 43

  
......
45 46
sub add {
46 47
  $lxdebug->enter_sub();
47 48

  
49
  return $lxdebug->leave_sub() if (load_draft_maybe());
50

  
48 51
  $form->{title} = $locale->text('Add Vendor Invoice');
49 52

  
50 53
  &invoice_links;
......
399 402
<input type=hidden name=storno value=$form->{storno}>
400 403
<input type=hidden name=storno_id value=$form->{storno_id}>
401 404

  
405
| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq|
406

  
402 407
<table width=100%>
403 408
  <tr class=listtop>
404 409
    <th class=listtop>$form->{title}</th>
......
803 808

  
804 809
  if (!$form->{id} && ($invdate > $closedto)) {
805 810
    print qq| <input class=submit type=submit name=action value="|
806
      . $locale->text('Post') . qq|">|;
811
      . $locale->text('Post') . qq|"> | .
812
      NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
813
                       '-class' => 'submit'));
807 814
  }
808 815

  
809 816
  print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) .
......
816 823
<input type=hidden name=path value=$form->{path}>
817 824
<input type=hidden name=login value=$form->{login}>
818 825
<input type=hidden name=password value=$form->{password}>
819
|;
826
|
827
  . $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
828
  . $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]);
829

  
820 830
  # button for saving history
821 831
  if($form->{id} ne "") {
822 832
    print qq|
......
1070 1080

  
1071 1081

  
1072 1082
  relink_accounts();
1073
  if (IR->post_invoice(\%myconfig, \%$form)){ 
1083
  if (IR->post_invoice(\%myconfig, \%$form)){
1074 1084
  	# saving the history
1075 1085
  	if(!exists $form->{addition} && $form->{id} ne "") {
1076 1086
  		$form->{addition} = "POSTED";
......
1078 1088
  		$form->save_history($form->dbconnect(\%myconfig));
1079 1089
  	}
1080 1090
	# /saving the history
1091
    remove_draft();
1081 1092
  	$form->redirect(  $locale->text('Invoice')
1082 1093
                  . " $form->{invnumber} "
1083 1094
                  . $locale->text('posted!'));
bin/mozilla/is.pl
37 37

  
38 38
require "$form->{path}/io.pl";
39 39
require "$form->{path}/arap.pl";
40
require "bin/mozilla/drafts.pl";
40 41

  
41 42
1;
42 43

  
......
44 45

  
45 46
sub add {
46 47
  $lxdebug->enter_sub();
47
  
48

  
49
  return $lxdebug->leave_sub() if (load_draft_maybe());
50

  
48 51
  if ($form->{type} eq "credit_note") {
49 52
    $form->{title} = $locale->text('Add Credit Note');
50 53

  
......
621 624
<input type=hidden name=storno value=$form->{storno}>
622 625
<input type=hidden name=storno_id value=$form->{storno_id}>
623 626

  
624

  
627
| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq|
625 628

  
626 629
<table width=100%>
627 630
  <tr class=listtop>
......
1150 1153
      <input class=submit type=submit name=action value="|
1151 1154
        . $locale->text('Print and Post') . qq|">
1152 1155
      <input class=submit type=submit name=action value="|
1153
        . $locale->text('Post') . qq|">|;
1156
        . $locale->text('Post') . qq|"> | .
1157
        NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
1158
                         '-class' => 'submit'));
1154 1159
    }
1155 1160
  }
1156 1161

  
......
1172 1177
<input type=hidden name=rowcount value=$form->{rowcount}>
1173 1178

  
1174 1179
<input name=callback type=hidden value="$form->{callback}">
1175

  
1180
|
1181
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
1182
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
1183
. qq|
1176 1184
<input type=hidden name=path value=$form->{path}>
1177 1185
<input type=hidden name=login value=$form->{login}>
1178 1186
<input type=hidden name=password value=$form->{password}>
......
1445 1453
    if (!(IS->post_invoice(\%myconfig, \%$form))) {
1446 1454
      $form->error($locale->text('Cannot post invoice!'));
1447 1455
    }
1456
    remove_draft();
1448 1457
    # saving the history
1449 1458
  	if(!exists $form->{addition}) {
1450 1459
  	  $form->{addition} = "PRINTED AND POSTED";
......
1453 1462
    # /saving the history
1454 1463
    
1455 1464
  } else {
1456
      if (IS->post_invoice(\%myconfig, \%$form)){
1465
    if (IS->post_invoice(\%myconfig, \%$form)){
1466
      remove_draft();
1457 1467
    	# saving the history
1458
  		if(!exists $form->{addition}) {
1468
        if(!exists $form->{addition}) {
1459 1469
  	  		if($form->{storno}) {
1460 1470
  	  			$form->{addition} = "STORNO";
1461 1471
  	  		}
doc/changelog
3 3
####################################
4 4
2007-02-?? - Version 2.4.2
5 5

  
6
  - Einkaufs-, Verkaufs-, Debitoren- und Kreditorenrechnungen k?nnen
7
    als Entwurf gespeichert und sp?ter weiter bearbeitet werden. Dabei
8
    werden sie nicht gebucht.
6 9
  - Vorlagenausdruck: Variablen "fax", "phone" und "email" bei
7 10
    Kundenstammdaten werden nun auch als "customerfax",
8 11
    "customerphone" und "customeremail" zur Verf?gung gestellt.
locale/de/all
368 368
  'Directory'                   => 'Verzeichnis',
369 369
  'Discount'                    => 'Rabatt',
370 370
  'Done'                        => 'Fertig',
371
  'Draft saved.'                => 'Entwurf gespeichert.',
371 372
  'Drawing'                     => 'Zeichnung',
372 373
  'Driver'                      => 'Treiber',
373 374
  'Dropdown Limit'              => 'Auswahllistenbegrenzung',
......
447 448
  'Employee'                    => 'Bearbeiter',
448 449
  'Empty transaction!'          => 'Buchung ist leer!',
449 450
  'Enforce transaction reversal for all dates' => 'Gegenbuchungen f?r jeden Zeitraum aktualisieren',
451
  'Enter a description for this new draft.' => 'Geben Sie eine Beschreibung f&uuml;r diesen Entwurf ein.',
450 452
  'Enter longdescription'       => 'Langtext eingeben',
451 453
  'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Geben Sie Ihre und weitere W?hrungen mit bis zu drei Buchstaben pro W?hrung und W?hrungen durch Doppelpunkte getrennt ein (z.B. EUR:USD:CAD)',
452 454
  'Equity'                      => 'Passiva',
......
627 629
  'List Pricegroups'            => 'Preisgruppen anzeigen',
628 630
  'List Printer'                => 'Drucker anzeigen',
629 631
  'List Transactions'           => 'Buchungsliste',
632
  'Load draft'                  => 'Entwurf laden',
633
  'Loading a draft will remove it from this list until you click the \'Save Draft\' button again.' => 'Das Laden eines Entwurfs wird ihn aus dieser Liste entfernen, bis Sie erneut auf \'Entwurf Speichern\' klicken.',
630 634
  'Local Tax Office Preferences' => 'Angaben zum Finanzamt',
631 635
  'Lock System'                 => 'System sperren',
632 636
  'Lockfile created!'           => 'System gesperrt!',
......
903 907
  'Save and Quotation'          => 'Speichern und Angebot',
904 908
  'Save and RFQ'                => 'Speichern und Lieferantenanfrage',
905 909
  'Save as new'                 => 'als neu speichern',
910
  'Save draft'                  => 'Entwurf speichern',
906 911
  'Screen'                      => 'Bildschirm',
907 912
  'Search Dunning'              => 'Mahnung suchen',
908 913
  'Select'                      => 'ausw?hlen',
......
946 951
  'Show details'                => 'Details anzeigen',
947 952
  'Show old dunnings'           => 'Alte Mahnungen anzeigen',
948 953
  'Signature'                   => 'Unterschrift',
954
  'Skip'                        => '?berspringen',
949 955
  'Skonto'                      => 'Skonto',
950 956
  'Skonto Terms'                => 'Zahlungsziel Skonto',
951 957
  'Sold'                        => 'Verkauft',
......
1014 1020
  'The following Buchungsgruppen have already been created:' => 'Die folgenden Buchungsgruppen wurden bereits angelegt:',
1015 1021
  'The following Datasets are not in use and can be deleted' => 'Die folgenden Datenbanken sind nicht in Verwendung und k?nnen gel?scht werden',
1016 1022
  'The following Datasets need to be updated' => 'Folgende Datenbanken m?ssen aktualisiert werden',
1023
  'The following drafts have been saved and can be loaded.' => 'Die folgenden Entw&uuml;rfe wurden gespeichert und k&ouml;nnen geladen werden.',
1017 1024
  'The following units are unknown.' => 'Die folgenden Einheiten sind unbekannt.',
1018 1025
  'The following units exist already:' => 'Die folgenden Einheiten existieren bereits:',
1019 1026
  'The following warnings occured during an upgrade to the document templates:' => 'Die folgenden Warnungen traten w&auml;hrend einer Aktualisierung der Dokumentenvorlagen auf:',
locale/de/ap
35 35
  'Delete'                      => 'L?schen',
36 36
  'Department'                  => 'Abteilung',
37 37
  'Description'                 => 'Beschreibung',
38
  'Draft saved.'                => 'Entwurf gespeichert.',
38 39
  'Due Date'                    => 'F?lligkeitsdatum',
39 40
  'Due Date missing!'           => 'F?lligkeitsdatum fehlt!',
40 41
  'ELSE'                        => 'Zusatz',
......
103 104
  'SAVED'                       => 'Gespeichert',
104 105
  'SAVED FOR DUNNING'           => 'Gespeichert',
105 106
  'SCREENED'                    => 'Angezeigt',
107
  'Save draft'                  => 'Entwurf speichern',
106 108
  'Select a Customer'           => 'Endkunde ausw?hlen',
107 109
  'Select a part'               => 'Artikel ausw&auml;hlen',
108 110
  'Select a project'            => 'Projekt ausw&auml;hlen',
......
162 164
  'delete'                      => 'delete',
163 165
  'delivery_customer_selection' => 'delivery_customer_selection',
164 166
  'display_form'                => 'display_form',
167
  'dont_load_draft'             => 'dont_load_draft',
165 168
  'edit'                        => 'edit',
166 169
  'employee_selection_internal' => 'employee_selection_internal',
167 170
  'form_footer'                 => 'form_footer',
168 171
  'form_header'                 => 'form_header',
169 172
  'format_dates'                => 'format_dates',
170 173
  'gl_transaction'              => 'gl_transaction',
174
  'load_draft'                  => 'load_draft',
175
  'load_draft_maybe'            => 'load_draft_maybe',
171 176
  'name_selected'               => 'name_selected',
172 177
  'part_selection_internal'     => 'part_selection_internal',
173 178
  'post'                        => 'post',
......
176 181
  'project_selected'            => 'project_selected',
177 182
  'project_selection_internal'  => 'project_selection_internal',
178 183
  'reformat_numbers'            => 'reformat_numbers',
184
  'remove_draft'                => 'remove_draft',
179 185
  'restore_form'                => 'restore_form',
180 186
  'sales_invoice'               => 'sales_invoice',
187
  'save_draft'                  => 'save_draft',
181 188
  'save_form'                   => 'save_form',
182 189
  'search'                      => 'search',
183 190
  'select_employee'             => 'select_employee',
......
200 207
  'kreditorenbuchung_bearbeiten' => 'edit_accounts_payables_transaction',
201 208
  'buchen'                      => 'post',
202 209
  'zahlung_buchen'              => 'post_payment',
210
  'entwurf_speichern'           => 'save_draft',
211
  '?berspringen'                => 'skip',
203 212
  'erneuern'                    => 'update',
204 213
  'als_vorlage_verwenden'       => 'use_as_template',
205 214
  'einkaufsrechnung'            => 'vendor_invoice',
locale/de/ar
39 39
  'Delete'                      => 'L?schen',
40 40
  'Department'                  => 'Abteilung',
41 41
  'Description'                 => 'Beschreibung',
42
  'Draft saved.'                => 'Entwurf gespeichert.',
42 43
  'Due Date'                    => 'F?lligkeitsdatum',
43 44
  'Due Date missing!'           => 'F?lligkeitsdatum fehlt!',
44 45
  'ELSE'                        => 'Zusatz',
......
109 110
  'SCREENED'                    => 'Angezeigt',
110 111
  'Sales Invoice'               => 'Rechnung',
111 112
  'Salesperson'                 => 'Verk?ufer',
113
  'Save draft'                  => 'Entwurf speichern',
112 114
  'Select a Customer'           => 'Endkunde ausw?hlen',
113 115
  'Select a part'               => 'Artikel ausw&auml;hlen',
114 116
  'Select a project'            => 'Projekt ausw&auml;hlen',
......
171 173
  'delivery_customer_selection' => 'delivery_customer_selection',
172 174
  'display'                     => 'display',
173 175
  'display_form'                => 'display_form',
176
  'dont_load_draft'             => 'dont_load_draft',
174 177
  'edit'                        => 'edit',
175 178
  'employee_selection_internal' => 'employee_selection_internal',
176 179
  'form_footer'                 => 'form_footer',
177 180
  'form_header'                 => 'form_header',
178 181
  'format_dates'                => 'format_dates',
179 182
  'gl_transaction'              => 'gl_transaction',
183
  'load_draft'                  => 'load_draft',
184
  'load_draft_maybe'            => 'load_draft_maybe',
180 185
  'name_selected'               => 'name_selected',
181 186
  'part_selection_internal'     => 'part_selection_internal',
182 187
  'post'                        => 'post',
......
185 190
  'project_selected'            => 'project_selected',
186 191
  'project_selection_internal'  => 'project_selection_internal',
187 192
  'reformat_numbers'            => 'reformat_numbers',
193
  'remove_draft'                => 'remove_draft',
188 194
  'restore_form'                => 'restore_form',
189 195
  'sales_invoice'               => 'sales_invoice',
196
  'save_draft'                  => 'save_draft',
190 197
  'save_form'                   => 'save_form',
191 198
  'search'                      => 'search',
192 199
  'section_menu'                => 'section_menu',
......
209 216
  'buchen'                      => 'post',
210 217
  'zahlung_buchen'              => 'post_payment',
211 218
  'rechnung'                    => 'sales_invoice',
219
  'entwurf_speichern'           => 'save_draft',
220
  '?berspringen'                => 'skip',
212 221
  'erneuern'                    => 'update',
213 222
  'als_vorlage_verwenden'       => 'use_as_template',
214 223
  'ja'                          => 'yes',
locale/de/drafts
1
$self->{texts} = {
2
  'ADDED'                       => 'Hinzugef?gt',
3
  'Address'                     => 'Adresse',
4
  'Customer Number'             => 'Kundennummer',
5
  'DELETED'                     => 'Gel?scht',
6
  'DUNNING STARTED'             => 'DUNNING STARTED',
7
  'Draft saved.'                => 'Entwurf gespeichert.',
8
  'ELSE'                        => 'Zusatz',
9
  'Enter longdescription'       => 'Langtext eingeben',
10
  'History'                     => 'Historie',
11
  'MAILED'                      => 'Gesendet',
12
  'Name'                        => 'Name',
13
  'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
14
  'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein H?ndler gefunden',
15
  'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
16
  'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
17
  'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
18
  'PAYMENT POSTED'              => 'Rechung gebucht',
19
  'POSTED'                      => 'Gebucht',
20
  'POSTED AS NEW'               => 'Als neu gebucht',
21
  'PRINTED'                     => 'Gedruckt',
22
  'Part Number'                 => 'Artikelnummer',
23
  'Part description'            => 'Artikelbeschreibung',
24
  'Please enter values'         => 'Bitte Werte eingeben',
25
  'Project Number'              => 'Projektnummer',
26
  'Project description'         => 'Projektbeschreibung',
27
  'SAVED'                       => 'Gespeichert',
28
  'SAVED FOR DUNNING'           => 'Gespeichert',
29
  'SCREENED'                    => 'Angezeigt',
30
  'Select a Customer'           => 'Endkunde ausw?hlen',
31
  'Select a part'               => 'Artikel ausw&auml;hlen',
32
  'Select a project'            => 'Projekt ausw&auml;hlen',
33
  'Select an employee'          => 'Angestellten ausw&auml;hlen',
34
  'Unit'                        => 'Einheit',
35
  'Value'                       => 'Wert',
36
  'Variable'                    => 'Variable',
37
  'bin_list'                    => 'Lagerliste',
38
  'invoice'                     => 'Rechnung',
39
  'packing_list'                => 'Versandliste',
40
  'pick_list'                   => 'Entnahmeliste',
41
  'proforma'                    => 'Proforma',
42
  'purchase_order'              => 'Auftrag',
43
  'request_quotation'           => 'Angebotsanforderung',
44
  'sales_order'                 => 'Kundenauftrag',
45
  'sales_quotation'             => 'Verkaufsangebot',
46
};
47

  
48
$self->{subs} = {
49
  'E'                           => 'E',
50
  'H'                           => 'H',
51
  'NTI'                         => 'NTI',
52
  'Q'                           => 'Q',
53
  'build_std_url'               => 'build_std_url',
54
  'calculate_qty'               => 'calculate_qty',
55
  'delivery_customer_selection' => 'delivery_customer_selection',
56
  'dont_load_draft'             => 'dont_load_draft',
57
  'employee_selection_internal' => 'employee_selection_internal',
58
  'format_dates'                => 'format_dates',
59
  'load_draft'                  => 'load_draft',
60
  'load_draft_maybe'            => 'load_draft_maybe',
61
  'part_selection_internal'     => 'part_selection_internal',
62
  'project_selection_internal'  => 'project_selection_internal',
63
  'reformat_numbers'            => 'reformat_numbers',
64
  'remove_draft'                => 'remove_draft',
65
  'restore_form'                => 'restore_form',
66
  'save_draft'                  => 'save_draft',
67
  'save_form'                   => 'save_form',
68
  'select_employee'             => 'select_employee',
69
  'select_employee_internal'    => 'select_employee_internal',
70
  'select_part'                 => 'select_part',
71
  'select_part_internal'        => 'select_part_internal',
72
  'set_longdescription'         => 'set_longdescription',
73
  'show_history'                => 'show_history',
74
  'vendor_selection'            => 'vendor_selection',
75
  'entwurf_speichern'           => 'save_draft',
76
  '?berspringen'                => 'skip',
77
};
78

  
79
1;
locale/de/ir
53 53
  'Department'                  => 'Abteilung',
54 54
  'Description'                 => 'Beschreibung',
55 55
  'Discount'                    => 'Rabatt',
56
  'Draft saved.'                => 'Entwurf gespeichert.',
56 57
  'Due Date'                    => 'F?lligkeitsdatum',
57 58
  'E-mail'                      => 'eMail',
58 59
  'E-mail address missing!'     => 'E-Mail-Adresse fehlt!',
......
162 163
  'SAVED FOR DUNNING'           => 'Gespeichert',
163 164
  'SCREENED'                    => 'Angezeigt',
164 165
  'Sales Order'                 => 'Kundenauftrag',
166
  'Save draft'                  => 'Entwurf speichern',
165 167
  'Screen'                      => 'Bildschirm',
166 168
  'Select a Customer'           => 'Endkunde ausw?hlen',
167 169
  'Select a part'               => 'Artikel ausw&auml;hlen',
......
242 244
  'delivery_customer_selection' => 'delivery_customer_selection',
243 245
  'display_form'                => 'display_form',
244 246
  'display_row'                 => 'display_row',
247
  'dont_load_draft'             => 'dont_load_draft',
245 248
  'e_mail'                      => 'e_mail',
246 249
  'edit'                        => 'edit',
247 250
  'employee_selection_internal' => 'employee_selection_internal',
......
252 255
  'invoice_links'               => 'invoice_links',
253 256
  'invoicetotal'                => 'invoicetotal',
254 257
  'item_selected'               => 'item_selected',
258
  'load_draft'                  => 'load_draft',
259
  'load_draft_maybe'            => 'load_draft_maybe',
255 260
  'name_selected'               => 'name_selected',
256 261
  'new_item'                    => 'new_item',
257 262
  'new_license'                 => 'new_license',
......
269 274
  'quotation'                   => 'quotation',
270 275
  'reformat_numbers'            => 'reformat_numbers',
271 276
  'relink_accounts'             => 'relink_accounts',
277
  'remove_draft'                => 'remove_draft',
272 278
  'request_for_quotation'       => 'request_for_quotation',
273 279
  'restore_form'                => 'restore_form',
274 280
  'sales_invoice'               => 'sales_invoice',
281
  'save_draft'                  => 'save_draft',
275 282
  'save_form'                   => 'save_form',
276 283
  'select_employee'             => 'select_employee',
277 284
  'select_employee_internal'    => 'select_employee_internal',
......
298 305
  'l?schen'                     => 'delete',
299 306
  'buchen'                      => 'post',
300 307
  'zahlung_buchen'              => 'post_payment',
308
  'entwurf_speichern'           => 'save_draft',
309
  '?berspringen'                => 'skip',
301 310
  'storno'                      => 'storno',
302 311
  'erneuern'                    => 'update',
303 312
  'als_vorlage_verwenden'       => 'use_as_template',
locale/de/is
64 64
  'Department'                  => 'Abteilung',
65 65
  'Description'                 => 'Beschreibung',
66 66
  'Discount'                    => 'Rabatt',
67
  'Draft saved.'                => 'Entwurf gespeichert.',
67 68
  'Due Date'                    => 'F?lligkeitsdatum',
68 69
  'Dunning Amount'              => 'gemahnter Betrag',
69 70
  'E-mail'                      => 'eMail',
......
185 186
  'SCREENED'                    => 'Angezeigt',
186 187
  'Sales Order'                 => 'Kundenauftrag',
187 188
  'Salesperson'                 => 'Verk?ufer',
189
  'Save draft'                  => 'Entwurf speichern',
188 190
  'Screen'                      => 'Bildschirm',
189 191
  'Select a Customer'           => 'Endkunde ausw?hlen',
190 192
  'Select a part'               => 'Artikel ausw&auml;hlen',
......
267 269
  'delivery_customer_selection' => 'delivery_customer_selection',
268 270
  'display_form'                => 'display_form',
269 271
  'display_row'                 => 'display_row',
272
  'dont_load_draft'             => 'dont_load_draft',
270 273
  'e_mail'                      => 'e_mail',
271 274
  'edit'                        => 'edit',
272 275
  'employee_selection_internal' => 'employee_selection_internal',
......
277 280
  'invoice_links'               => 'invoice_links',
278 281
  'invoicetotal'                => 'invoicetotal',
279 282
  'item_selected'               => 'item_selected',
283
  'load_draft'                  => 'load_draft',
284
  'load_draft_maybe'            => 'load_draft_maybe',
280 285
  'name_selected'               => 'name_selected',
281 286
  'new_item'                    => 'new_item',
282 287
  'new_license'                 => 'new_license',
......
296 301
  'quotation'                   => 'quotation',
297 302
  'reformat_numbers'            => 'reformat_numbers',
298 303
  'relink_accounts'             => 'relink_accounts',
304
  'remove_draft'                => 'remove_draft',
299 305
  'request_for_quotation'       => 'request_for_quotation',
300 306
  'restore_form'                => 'restore_form',
301 307
  'sales_invoice'               => 'sales_invoice',
308
  'save_draft'                  => 'save_draft',
302 309
  'save_form'                   => 'save_form',
303 310
  'select_employee'             => 'select_employee',
304 311
  'select_employee_internal'    => 'select_employee_internal',
......
331 338
  'druckvorschau'               => 'preview',
332 339
  'drucken'                     => 'print',
333 340
  'drucken_und_buchen'          => 'print_and_post',
341
  'entwurf_speichern'           => 'save_draft',
334 342
  'lieferadresse'               => 'ship_to',
343
  '?berspringen'                => 'skip',
335 344
  'storno'                      => 'storno',
336 345
  'erneuern'                    => 'update',
337 346
  'als_vorlage_verwenden'       => 'use_as_template',
sql/Pg-upgrade2/drafts.sql
1
-- @tag: drafts
2
-- @description: Neue Tabelle zum Speichern von Entw&uuml;rfen
3
-- @depends: release_2_4_1
4
CREATE TABLE drafts (
5
       id varchar(50) NOT NULL,
6
       module varchar(50) NOT NULL,
7
       submodule varchar(50) NOT NULL,
8
       description text,
9
       itime timestamp DEFAULT now(),
10
       form text,
11
       employee_id integer,
12

  
13
       PRIMARY KEY (id),
14
       FOREIGN KEY (employee_id) REFERENCES employee (id)
15
);

Auch abrufbar als: Unified diff