Revision e48eb4dc
Von Kivitendo Admin vor etwa 8 Jahren hinzugefügt
bin/mozilla/pe.pl | ||
---|---|---|
27 | 27 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
28 | 28 |
#====================================================================== |
29 | 29 |
# |
30 |
# partsgroup, pricegroup administration
|
|
30 |
# partsgroup administration |
|
31 | 31 |
# |
32 | 32 |
#====================================================================== |
33 | 33 |
|
... | ... | |
62 | 62 |
if ($::form->{type} eq 'partsgroup') { |
63 | 63 |
PE->get_partsgroup(\%::myconfig, $::form); |
64 | 64 |
} |
65 |
if ($::form->{type} eq 'pricegroup') { |
|
66 |
PE->get_pricegroup(\%::myconfig, $::form); |
|
67 |
} |
|
68 | 65 |
call_sub("form_$::form->{type}"); |
69 | 66 |
|
70 | 67 |
$::lxdebug->leave_sub; |
... | ... | |
92 | 89 |
$::form->redirect($::locale->text('Group saved!')); |
93 | 90 |
} |
94 | 91 |
|
95 |
# choice pricegroup and save |
|
96 |
if ($::form->{type} eq 'pricegroup') { |
|
97 |
$::form->isblank("pricegroup", $::locale->text('Pricegroup missing!')); |
|
98 |
PE->save_pricegroup(\%::myconfig, $::form); |
|
99 |
$::form->redirect($::locale->text('Pricegroup saved!')); |
|
100 |
} |
|
101 | 92 |
# saving the history |
102 | 93 |
if(!exists $::form->{addition} && $::form->{id} ne "") { |
103 | 94 |
$::form->{snumbers} = qq|projectnumber_| . $::form->{projectnumber}; |
... | ... | |
118 | 109 |
if ($::form->{type} eq 'partsgroup') { |
119 | 110 |
$::form->redirect($::locale->text('Group deleted!')); |
120 | 111 |
} |
121 |
if ($::form->{type} eq 'pricegroup') { |
|
122 |
$::form->redirect($::locale->text('Pricegroup deleted!')); |
|
123 |
} |
|
124 |
# saving the history |
|
125 |
if(!exists $::form->{addition}) { |
|
126 |
$::form->{snumbers} = qq|projectnumber_| . $::form->{projectnumber}; |
|
127 |
$::form->{addition} = "DELETED"; |
|
128 |
$::form->save_history; |
|
129 |
} |
|
130 |
# /saving the history |
|
131 | 112 |
$::lxdebug->leave_sub; |
132 | 113 |
} |
133 | 114 |
|
... | ... | |
177 | 158 |
|
178 | 159 |
$::lxdebug->leave_sub; |
179 | 160 |
} |
180 |
|
|
181 |
sub pricegroup_report { |
|
182 |
$::lxdebug->enter_sub; |
|
183 |
$::auth->assert('config'); |
|
184 |
|
|
185 |
$::form->{$_} = $::form->unescape($::form->{$_}) for qw(pricegroup); |
|
186 |
PE->pricegroups(\%::myconfig, $::form); |
|
187 |
|
|
188 |
my $callback = build_std_url('action=pricegroup_report', qw(type status)); |
|
189 |
|
|
190 |
my $option = ''; |
|
191 |
$option .= $::locale->text('All') if $::form->{status} eq 'all'; |
|
192 |
$option .= $::locale->text('Orphaned') if $::form->{status} eq 'orphaned'; |
|
193 |
|
|
194 |
if ($::form->{pricegroup}) { |
|
195 |
$callback .= "&pricegroup=$::form->{pricegroup}"; |
|
196 |
$option .= ", " . $::locale->text('Pricegroup') . " : $::form->{pricegroup}"; |
|
197 |
} |
|
198 |
|
|
199 |
# escape callback |
|
200 |
$::form->{callback} = $callback; |
|
201 |
|
|
202 |
$::form->header; |
|
203 |
print $::form->parse_html_template('pe/pricegroup_report', { |
|
204 |
option => $option, |
|
205 |
callback => $callback, |
|
206 |
editlink => build_std_url('action=edit', qw(type status callback)), |
|
207 |
}); |
|
208 |
|
|
209 |
$::lxdebug->leave_sub; |
|
210 |
} |
|
211 |
|
|
212 |
sub form_pricegroup { |
|
213 |
$::lxdebug->enter_sub; |
|
214 |
$::auth->assert('config'); |
|
215 |
|
|
216 |
# $locale->text('Add Pricegroup') |
|
217 |
# $locale->text('Edit Pricegroup') |
|
218 |
$::form->{title} = $::locale->text("$::form->{title} Pricegroup"); |
|
219 |
|
|
220 |
$::form->header; |
|
221 |
print $::form->parse_html_template('pe/pricegroup_form'); |
|
222 |
|
|
223 |
$::lxdebug->leave_sub; |
|
224 |
} |
Auch abrufbar als: Unified diff
Preisgruppen - Umstellung auf Controller, sortkey, obsolete
Neuer CRUD-Controller nur für Preisgruppen.
Die Reihenfolge der Preisgruppen kann nun eingestellt werden, und man
kann Preisgruppen auf ungültig setzen, sofern sie nicht mehr aktiv bei
Kunden in Verwendung sind, so daß sie bei Kunden oder neuen Belegen
nicht mehr ausgewählt werden können.