X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fpe.pl;h=0fd351dbe409545ab85fad472b27a769e0a3368a;hb=c2ed42c3f435937925ef825de61f2520196d1de6;hp=201e96b225e356bcf944418044b47f569dffdd1c;hpb=0576299f2aa98125991c4ffcd2f75073ea583d7d;p=kivitendo-erp.git
diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl
index 201e96b22..0fd351dbe 100644
--- a/bin/mozilla/pe.pl
+++ b/bin/mozilla/pe.pl
@@ -65,7 +65,9 @@ sub edit {
if ($form->{type} eq 'partsgroup') {
PE->get_partsgroup(\%myconfig, \%$form);
}
-
+ if ($form->{type} eq 'pricegroup') {
+ PE->get_pricegroup(\%myconfig, \%$form);
+ }
&{"form_$form->{type}_header"};
&{"form_$form->{type}_footer"};
@@ -106,6 +108,21 @@ sub search {
}
+ # for pricesgroups
+ if ($form->{type} eq 'pricegroup') {
+ $report = "pricegroup_report";
+ $sort = 'pricegroup';
+ $form->{title} = $locale->text('Pricegroup');
+
+ $number = qq|
+
+ | . $locale->text('Pricegroup') . qq| |
+ |
+
+|;
+
+ }
+
$form->header;
print qq|
@@ -130,8 +147,7 @@ sub search {
|
. $locale->text('All') . qq|
|
- . $locale->text('Orphaned')
- . qq| |
+ . $locale->text('Orphaned') . qq|
@@ -397,6 +413,13 @@ sub save {
$form->redirect($locale->text('Group saved!'));
}
+ # choice pricegroup and save
+ if ($form->{type} eq 'pricegroup') {
+ $form->isblank("pricegroup", $locale->text('Pricegroup missing!'));
+ PE->save_pricegroup(\%myconfig, \%$form);
+ $form->redirect($locale->text('Pricegroup saved!'));
+ }
+
$lxdebug->leave_sub();
}
@@ -411,6 +434,9 @@ sub delete {
if ($form->{type} eq 'partsgroup') {
$form->redirect($locale->text('Group deleted!'));
}
+ if ($form->{type} eq 'pricegroup') {
+ $form->redirect($locale->text('Pricegroup deleted!'));
+ }
$lxdebug->leave_sub();
}
@@ -611,3 +637,208 @@ sub form_partsgroup_footer {
$lxdebug->leave_sub();
}
+
+#################################
+# get pricesgroups and build up html-code
+#
+sub pricegroup_report {
+ $lxdebug->enter_sub();
+
+ map { $form->{$_} = $form->unescape($form->{$_}) } (pricegroup);
+ PE->pricegroups(\%myconfig, \%$form);
+
+ $callback =
+ "$form->{script}?action=pricegroup_report&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
+
+ if ($form->{status} eq 'all') {
+ $option = $locale->text('All');
+ }
+ if ($form->{status} eq 'orphaned') {
+ $option .= $locale->text('Orphaned');
+ }
+ if ($form->{pricegroup}) {
+ $callback .= "&pricegroup=$form->{pricegroup}";
+ $option .=
+ "\n
" . $locale->text('Pricegroup') . " : $form->{pricegroup}";
+ }
+
+ @column_index = $form->sort_columns(qw(pricegroup));
+
+ $column_header{pricegroup} =
+ qq||
+ . $locale->text('Pricegroup')
+ . qq| | |;
+
+ $form->{title} = $locale->text('Pricegroup');
+
+ $form->header;
+
+ print qq|
+
+
+
+
+ $form->{title} |
+
+
+
+ $option |
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+