Historie eingefügt
[kivitendo-erp.git] / bin / mozilla / pe.pl
1 #=====================================================================
2 # LX-Office ERP
3 # Copyright (C) 2004
4 # Based on SQL-Ledger Version 2.1.9
5 # Web http://www.lx-office.org
6 #
7 #=====================================================================
8 # SQL-Ledger Accounting
9 # Copyright (c) 1998-2002
10 #
11 #  Author: Dieter Simader
12 #   Email: dsimader@sql-ledger.org
13 #     Web: http://www.sql-ledger.org
14 #
15 #
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
20 #
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #======================================================================
29 #
30 # project administration
31 # partsgroup administration
32 #
33 #======================================================================
34
35 use SL::PE;
36
37 require "bin/mozilla/common.pl";
38
39 1;
40
41 # end of main
42
43 sub add {
44   $lxdebug->enter_sub();
45
46   $form->{title} = "Add";
47
48   # construct callback
49   $form->{callback} =
50     "$form->{script}?action=add&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
51     unless $form->{callback};
52
53   &{"form_$form->{type}_header"};
54   &{"form_$form->{type}_footer"};
55
56   $lxdebug->leave_sub();
57 }
58
59 sub edit {
60   $lxdebug->enter_sub();
61   # show history button
62   $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
63   #/show hhistory button
64   $form->{title} = "Edit";
65
66   if ($form->{type} eq 'project') {
67     PE->get_project(\%myconfig, \%$form);
68   }
69   if ($form->{type} eq 'partsgroup') {
70     PE->get_partsgroup(\%myconfig, \%$form);
71   }
72   if ($form->{type} eq 'pricegroup') {
73     PE->get_pricegroup(\%myconfig, \%$form);
74   }
75   &{"form_$form->{type}_header"};
76   &{"form_$form->{type}_footer"};
77
78   $lxdebug->leave_sub();
79 }
80
81 sub search {
82   $lxdebug->enter_sub();
83
84   if ($form->{type} eq 'project') {
85     $report        = "project_report";
86     $sort          = 'projectnumber';
87     $form->{title} = $locale->text('Projects');
88
89     $number = qq|
90         <tr>
91           <th align=right width=1%>| . $locale->text('Number') . qq|</th>
92           <td>| . $cgi->textfield('-name' => 'projectnumber', '-size' => 20) . qq|</td>
93         </tr>
94         <tr>
95           <th align=right>| . $locale->text('Description') . qq|</th>
96           <td>| . $cgi->textfield('-name' => 'description', '-size' => 60) . qq|</td>
97         </tr>
98   <tr>
99     <th>&nbsp;</th>
100     <td>| .
101     $cgi->radio_group('-name' => 'active', '-default' => 'active',
102                       '-values' => ['active', 'inactive', 'both'],
103                       '-labels' => { 'active' => ' ' . $locale->text("Active"),
104                                      'inactive' => ' ' . $locale->text("Inactive"),
105                                      'both' => ' ' . $locale->text("Both") })
106     . qq|</td>
107   </tr>
108 |;
109
110   }
111   if ($form->{type} eq 'partsgroup') {
112     $report        = "partsgroup_report";
113     $sort          = 'partsgroup';
114     $form->{title} = $locale->text('Groups');
115
116     $number = qq|
117         <tr>
118           <th align=right width=1%>| . $locale->text('Group') . qq|</th>
119           <td><input name=partsgroup size=20></td>
120         </tr>
121 |;
122
123   }
124
125   # for pricesgroups
126   if ($form->{type} eq 'pricegroup') {
127     $report        = "pricegroup_report";
128     $sort          = 'pricegroup';
129     $form->{title} = $locale->text('Pricegroup');
130
131     $number = qq|
132         <tr>
133           <th align=right width=1%>| . $locale->text('Pricegroup') . qq|</th>
134           <td><input name=pricegroup size=20></td>
135         </tr>
136 |;
137
138   }
139
140   $form->header;
141
142   print qq|
143 <body>
144
145 <form method=post action=$form->{script}>
146
147 <input type=hidden name=sort value=$sort>
148 <input type=hidden name=type value=$form->{type}>
149
150 <table width=100%>
151   <tr>
152     <th class=listtop>$form->{title}</th>
153   </tr>
154   <tr height="5"></tr>
155   <tr>
156     <td>
157       <table width=100%>
158         $number
159         <tr>
160           <td></td>
161           <td><input name=status class=radio type=radio value=all checked>&nbsp;|
162     . $locale->text('All') . qq|
163           <input name=status class=radio type=radio value=orphaned>&nbsp;|
164     . $locale->text('Orphaned') . qq|</td>
165         </tr>
166       </table>
167     </td>
168   </tr>
169   <tr>
170     <td><hr size=3 noshade></td>
171   </tr>
172 </table>
173
174 <input type=hidden name=nextsub value=$report>
175
176 <input type=hidden name=path value=$form->{path}>
177 <input type=hidden name=login value=$form->{login}>
178 <input type=hidden name=password value=$form->{password}>
179
180 <br>
181 <input class=submit type=submit name=action value="|
182     . $locale->text('Continue') . qq|">
183 </form>
184
185 </body>
186 </html>
187 |;
188
189   $lxdebug->leave_sub();
190 }
191
192 sub project_report {
193   $lxdebug->enter_sub();
194
195   map { $form->{$_} = $form->unescape($form->{$_}) }
196     (projectnumber, description);
197   PE->projects(\%myconfig, \%$form);
198
199   $callback =
200     "$form->{script}?action=project_report&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}&active=" .
201     E($form->{active});
202   $href = $callback;
203
204   if ($form->{status} eq 'all') {
205     $option = $locale->text('All');
206   }
207   if ($form->{status} eq 'orphaned') {
208     $option .= $locale->text('Orphaned');
209   }
210   if ($form->{projectnumber}) {
211     $href     .= "&projectnumber=" . $form->escape($form->{projectnumber});
212     $callback .= "&projectnumber=$form->{projectnumber}";
213     $option   .=
214       "\n<br>" . $locale->text('Project') . " : $form->{projectnumber}";
215   }
216   if ($form->{description}) {
217     $href     .= "&description=" . $form->escape($form->{description});
218     $callback .= "&description=$form->{description}";
219     $option   .=
220       "\n<br>" . $locale->text('Description') . " : $form->{description}";
221   }
222
223   @column_index = qw(projectnumber description);
224
225   push(@column_index, "active") if ("both" eq $form->{active});
226
227   $column_header{projectnumber} =
228       qq|<th><a class=listheading href=$href&sort=projectnumber>|
229     . $locale->text('Number')
230     . qq|</a></th>|;
231   $column_header{description} =
232       qq|<th><a class=listheading href=$href&sort=description>|
233     . $locale->text('Description')
234     . qq|</a></th>|;
235   $column_header{active} =
236       qq|<th class="listheading">| . $locale->text('Active') . qq|</th>|;
237
238   $form->{title} = $locale->text('Projects');
239
240   $form->header;
241
242   print qq|
243 <body>
244
245 <table width=100%>
246   <tr>
247     <th class=listtop>$form->{title}</th>
248   </tr>
249   <tr height="5"></tr>
250   <tr>
251     <td>$option</td>
252   </tr>
253   <tr>
254     <td>
255       <table width=100%>
256         <tr class=listheading>
257 |;
258
259   map { print "$column_header{$_}\n" } @column_index;
260
261   print qq|
262         </tr>
263 |;
264
265   # escape callback
266   $form->{callback} = $callback .= "&sort=$form->{sort}";
267
268   # escape callback for href
269   $callback = $form->escape($callback);
270
271   foreach $ref (@{ $form->{project_list} }) {
272
273     $i++;
274     $i %= 2;
275
276     print qq|
277         <tr valign=top class=listrow$i>
278 |;
279
280     $column_data{projectnumber} =
281       qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{projectnumber}</td>|;
282     $column_data{description} = qq|<td>$ref->{description}&nbsp;</td>|;
283     $column_data{active} =
284       qq|<td>| .
285       ($ref->{active} ? $locale->text("Yes") : $locale->text("No")) .
286       qq|</td>|;
287
288     map { print "$column_data{$_}\n" } @column_index;
289
290     print "
291         </tr>
292 ";
293   }
294
295   print qq|
296       </table>
297     </td>
298   </tr>
299   <tr>
300     <td><hr size=3 noshade></td>
301   </tr>
302 </table>
303
304 <br>
305 <form method=post action=$form->{script}>
306
307 <input name=callback type=hidden value="$form->{callback}">
308
309 <input type=hidden name=type value=$form->{type}>
310
311 <input type=hidden name=path value=$form->{path}>
312 <input type=hidden name=login value=$form->{login}>
313 <input type=hidden name=password value=$form->{password}>
314
315 <input class=submit type=submit name=action value="|
316     . $locale->text('Add') . qq|">
317
318   </form>
319
320 </body>
321 </html>
322 |;
323
324   $lxdebug->leave_sub();
325 }
326
327 sub form_project_header {
328   $lxdebug->enter_sub();
329
330   $form->{title} = $locale->text("$form->{title} Project");
331
332   # $locale->text('Add Project')
333   # $locale->text('Edit Project')
334
335   $form->{description} =~ s/\"/&quot;/g;
336
337   my $projectnumber =
338     $cgi->textfield('-name' => 'projectnumber', '-size' => 20,
339                     '-default' => $form->{projectnumber});
340
341   my $description;
342   if (($rows = $form->numtextrows($form->{description}, 60)) > 1) {
343     $description =
344       $cgi->textarea('-name' => 'description', '-rows' => $rows, '-cols' => 60,
345                      '-style' => 'width: 100%', '-wrap' => 'soft',
346                      '-default' => $form->{description});
347   } else {
348     $description =
349       $cgi->textfield('-name' => 'description', '-size' => 60,
350                       '-default' => $form->{description});
351   }
352
353   my $active;
354   if ($form->{id}) {
355     $active =
356       qq|
357   <tr>
358     <th>&nbsp;</th>
359     <td>| .
360       $cgi->radio_group('-name' => 'active',
361                         '-values' => [1, 0],
362                         '-default' => $form->{active} * 1,
363                         '-labels' => { 1 => $locale->text("Active"),
364                                        0 => $locale->text("Inactive") })
365       . qq|</td>
366   </tr>
367 |;
368   }
369
370   $form->header;
371
372   print qq|
373 <body>
374
375 <form method=post action=$form->{script}>
376
377 <input type=hidden name=id value=$form->{id}>
378 <input type=hidden name=type value=project>
379
380 <table width=100%>
381   <tr>
382     <th class=listtop>$form->{title}</th>
383   </tr>
384   <tr height="5"></tr>
385   <tr>
386     <td>
387       <table>
388         <tr>
389           <th align=right>| . $locale->text('Number') . qq|</th>
390           <td>$projectnumber</td>
391         </tr>
392         <tr>
393           <th align=right>| . $locale->text('Description') . qq|</th>
394           <td>$description</td>
395         </tr>
396       $active
397       </table>
398     </td>
399   </tr>
400   <tr>
401     <td colspan=2><hr size=3 noshade></td>
402   </tr>
403 </table>
404 |;
405
406   $lxdebug->leave_sub();
407 }
408
409 sub form_project_footer {
410   $lxdebug->enter_sub();
411
412   print qq|
413
414 <input name=callback type=hidden value="$form->{callback}">
415
416 <input type=hidden name=path value=$form->{path}>
417 <input type=hidden name=login value=$form->{login}>
418 <input type=hidden name=password value=$form->{password}>
419
420 <br><input type=submit class=submit name=action value="|
421     . $locale->text('Save') . qq|">
422 |;
423
424   if ($form->{id} && $form->{orphaned}) {
425     print qq|
426 <input type=submit class=submit name=action value="|
427       . $locale->text('Delete') . qq|">|;
428   }
429
430 <<<<<<< .mine
431   if ($form->{menubar}) {
432     require "$form->{path}/menu.pl";
433     &menubar;
434   }
435 # button for saving history
436 print qq|
437         <input type=button onclick=set_history_window(|
438         . $form->{id} 
439         . qq|); name=history id=history value=|
440         . $locale->text('history') 
441         . qq|>|;
442 # /button for saving history
443 =======
444 >>>>>>> .r1940
445   print qq|
446 </form>
447
448 </body>
449 </html>
450 |;
451
452   $lxdebug->leave_sub();
453 }
454
455 sub save {
456   $lxdebug->enter_sub();
457
458   if ($form->{type} eq 'project') {
459     $form->isblank("projectnumber", $locale->text('Project Number missing!'));
460     PE->save_project(\%myconfig, \%$form);
461     $form->redirect($locale->text('Project saved!'));
462   }
463   if ($form->{type} eq 'partsgroup') {
464     $form->isblank("partsgroup", $locale->text('Group missing!'));
465     PE->save_partsgroup(\%myconfig, \%$form);
466     $form->redirect($locale->text('Group saved!'));
467   }
468
469   # choice pricegroup and save
470   if ($form->{type} eq 'pricegroup') {
471     $form->isblank("pricegroup", $locale->text('Pricegroup missing!'));
472     PE->save_pricegroup(\%myconfig, \%$form);
473     $form->redirect($locale->text('Pricegroup saved!'));
474   }
475   # saving the history
476   if(!exists $form->{addition} && $form->{id} ne "") {
477         $form->{addition} = "SAVED";
478         $form->save_history($form->dbconnect(\%myconfig));
479   }
480   # /saving the history 
481
482   $lxdebug->leave_sub();
483 }
484
485 sub delete {
486   $lxdebug->enter_sub();
487
488   PE->delete_tuple(\%myconfig, \%$form);
489
490   if ($form->{type} eq 'project') {
491     $form->redirect($locale->text('Project deleted!'));
492   }
493   if ($form->{type} eq 'partsgroup') {
494     $form->redirect($locale->text('Group deleted!'));
495   }
496   if ($form->{type} eq 'pricegroup') {
497     $form->redirect($locale->text('Pricegroup deleted!'));
498   }
499   # saving the history
500   if(!exists $form->{addition}) {
501         $form->{addition} = "DELETED";
502         $form->save_history($form->dbconnect(\%myconfig));
503   }
504   # /saving the history
505   $lxdebug->leave_sub();
506 }
507
508 sub continue { &{ $form->{nextsub} } }
509
510 sub partsgroup_report {
511   $lxdebug->enter_sub();
512
513   map { $form->{$_} = $form->unescape($form->{$_}) } (partsgroup);
514   PE->partsgroups(\%myconfig, \%$form);
515
516   $callback =
517     "$form->{script}?action=partsgroup_report&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
518
519   if ($form->{status} eq 'all') {
520     $option = $locale->text('All');
521   }
522   if ($form->{status} eq 'orphaned') {
523     $option .= $locale->text('Orphaned');
524   }
525   if ($form->{partsgroup}) {
526     $callback .= "&partsgroup=$form->{partsgroup}";
527     $option   .= "\n<br>" . $locale->text('Group') . " : $form->{partsgroup}";
528   }
529
530   @column_index = $form->sort_columns(qw(partsgroup));
531
532   $column_header{partsgroup} =
533     qq|<th class=listheading width=90%>| . $locale->text('Group') . qq|</th>|;
534
535   $form->{title} = $locale->text('Groups');
536
537   $form->header;
538
539   print qq|
540 <body>
541
542 <table width=100%>
543   <tr>
544     <th class=listtop>$form->{title}</th>
545   </tr>
546   <tr height="5"></tr>
547   <tr>
548     <td>$option</td>
549   </tr>
550   <tr>
551     <td>
552       <table width=100%>
553         <tr class=listheading>
554 |;
555
556   map { print "$column_header{$_}\n" } @column_index;
557
558   print qq|
559         </tr>
560 |;
561
562   # escape callback
563   $form->{callback} = $callback;
564
565   # escape callback for href
566   $callback = $form->escape($callback);
567
568   foreach $ref (@{ $form->{item_list} }) {
569
570     $i++;
571     $i %= 2;
572
573     print qq|
574         <tr valign=top class=listrow$i>
575 |;
576
577     $column_data{partsgroup} =
578       qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{partsgroup}</td>|;
579     map { print "$column_data{$_}\n" } @column_index;
580
581     print "
582         </tr>
583 ";
584   }
585
586   print qq|
587       </table>
588     </td>
589   </tr>
590   <tr>
591     <td><hr size=3 noshade></td>
592   </tr>
593 </table>
594
595 <br>
596 <form method=post action=$form->{script}>
597
598 <input name=callback type=hidden value="$form->{callback}">
599
600 <input type=hidden name=type value=$form->{type}>
601
602 <input type=hidden name=path value=$form->{path}>
603 <input type=hidden name=login value=$form->{login}>
604 <input type=hidden name=password value=$form->{password}>
605
606 <input class=submit type=submit name=action value="|
607     . $locale->text('Add') . qq|">
608
609   </form>
610
611 </body>
612 </html>
613 |;
614
615   $lxdebug->leave_sub();
616 }
617
618 sub form_partsgroup_header {
619   $lxdebug->enter_sub();
620
621   $form->{title} = $locale->text("$form->{title} Group");
622
623   # $locale->text('Add Group')
624   # $locale->text('Edit Group')
625
626   $form->{partsgroup} =~ s/\"/&quot;/g;
627
628   $form->header;
629
630   print qq|
631 <body>
632
633 <form method=post action=$form->{script}>
634
635 <input type=hidden name=id value=$form->{id}>
636 <input type=hidden name=type value=$form->{type}>
637
638 <table width=100%>
639   <tr>
640     <th class=listtop>$form->{title}</th>
641   </tr>
642   <tr height="5"></tr>
643   <tr>
644     <td>
645       <table width=100%>
646         <tr>
647           <th align=right>| . $locale->text('Group') . qq|</th>
648
649           <td><input name=partsgroup size=30 value="$form->{partsgroup}"></td>
650         </tr>
651       </table>
652     </td>
653   </tr>
654   <tr>
655     <td colspan=2><hr size=3 noshade></td>
656   </tr>
657 </table>
658 |;
659
660   $lxdebug->leave_sub();
661 }
662
663 sub form_partsgroup_footer {
664   $lxdebug->enter_sub();
665
666   print qq|
667
668 <input name=callback type=hidden value="$form->{callback}">
669
670 <input type=hidden name=path value=$form->{path}>
671 <input type=hidden name=login value=$form->{login}>
672 <input type=hidden name=password value=$form->{password}>
673
674 <br><input type=submit class=submit name=action value="|
675     . $locale->text('Save') . qq|">
676 |;
677
678   if ($form->{id} && $form->{orphaned}) {
679     print qq|
680 <input type=submit class=submit name=action value="|
681       . $locale->text('Delete') . qq|">|;
682   }
683
684 <<<<<<< .mine
685   if ($form->{menubar}) {
686     require "$form->{path}/menu.pl";
687     &menubar;
688   }
689 # button for saving history
690 print qq|
691         <input type=button onclick=set_history_window(|
692         . $form->{id} 
693         . qq|); name=history id=history value=|
694         . $locale->text('history') 
695         . qq|>|;
696 # /button for saving history
697 =======
698 >>>>>>> .r1940
699   print qq|
700 </form>
701
702 </body>
703 </html>
704 |;
705
706   $lxdebug->leave_sub();
707 }
708
709 #################################
710 # get pricesgroups and build up html-code
711 #
712 sub pricegroup_report {
713   $lxdebug->enter_sub();
714
715   map { $form->{$_} = $form->unescape($form->{$_}) } (pricegroup);
716   PE->pricegroups(\%myconfig, \%$form);
717
718   $callback =
719     "$form->{script}?action=pricegroup_report&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
720
721   if ($form->{status} eq 'all') {
722     $option = $locale->text('All');
723   }
724   if ($form->{status} eq 'orphaned') {
725     $option .= $locale->text('Orphaned');
726   }
727   if ($form->{pricegroup}) {
728     $callback .= "&pricegroup=$form->{pricegroup}";
729     $option   .=
730       "\n<br>" . $locale->text('Pricegroup') . " : $form->{pricegroup}";
731   }
732
733   @column_index = $form->sort_columns(qw(pricegroup));
734
735   $column_header{pricegroup} =
736       qq|<th class=listheading width=90%>|
737     . $locale->text('Pricegroup')
738     . qq|</th>|;
739
740   $form->{title} = $locale->text('Pricegroup');
741
742   $form->header;
743
744   print qq|
745 <body>
746
747 <table width=100%>
748   <tr>
749     <th class=listtop>$form->{title}</th>
750   </tr>
751   <tr height="5"></tr>
752   <tr>
753     <td>$option</td>
754   </tr>
755   <tr>
756     <td>
757       <table width=100%>
758         <tr class=listheading>
759 |;
760
761   map { print "$column_header{$_}\n" } @column_index;
762
763   print qq|
764         </tr>
765 |;
766
767   # escape callback
768   $form->{callback} = $callback;
769
770   # escape callback for href
771   $callback = $form->escape($callback);
772
773   foreach $ref (@{ $form->{item_list} }) {
774
775     $i++;
776     $i %= 2;
777
778     print qq|
779         <tr valign=top class=listrow$i>
780 |;
781     $column_data{pricegroup} =
782       qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{pricegroup}</td>|;
783
784     map { print "$column_data{$_}\n" } @column_index;
785
786     print "
787         </tr>
788 ";
789   }
790
791   print qq|
792       </table>
793     </td>
794   </tr>
795   <tr>
796     <td><hr size=3 noshade></td>
797   </tr>
798 </table>
799
800 <br>
801 <form method=post action=$form->{script}>
802
803 <input name=callback type=hidden value="$form->{callback}">
804
805 <input type=hidden name=type value=$form->{type}>
806
807 <input type=hidden name=path value=$form->{path}>
808 <input type=hidden name=login value=$form->{login}>
809 <input type=hidden name=password value=$form->{password}>
810
811 <input class=submit type=submit name=action value="|
812     . $locale->text('Add') . qq|">
813
814   </form>
815
816 </body>
817 </html>
818 |;
819
820   $lxdebug->leave_sub();
821 }
822
823 #######################
824 #build up pricegroup_header
825 #
826 sub form_pricegroup_header {
827   $lxdebug->enter_sub();
828
829   # $locale->text('Add Pricegroup')
830   # $locale->text('Edit Pricegroup')
831
832   $form->{title} = $locale->text("$form->{title} Pricegroup");
833
834   $form->{pricegroup} =~ s/\"/&quot;/g;
835
836   $form->header;
837
838   print qq|
839 <body>
840
841 <form method=post action=$form->{script}>
842
843 <input type=hidden name=id value=$form->{id}>
844 <input type=hidden name=type value=$form->{type}>
845
846 <table width=100%>
847   <tr>
848     <th class=listtop>$form->{title}</th>
849   </tr>
850   <tr height="5"></tr>
851   <tr>
852     <td>
853       <table width=100%>
854         <tr>
855           <th align=right>| . $locale->text('Preisgruppe') . qq|</th>
856           <td><input name=pricegroup size=30 value="$form->{pricegroup}"></td>
857         </tr>
858       </table>
859     </td>
860   </tr>
861   <tr>
862     <td colspan=2><hr size=3 noshade></td>
863   </tr>
864 </table>
865 |;
866
867   $lxdebug->leave_sub();
868 }
869 ######################
870 #build up pricegroup_footer
871 #
872 sub form_pricegroup_footer {
873   $lxdebug->enter_sub();
874
875   print qq|
876
877 <input name=callback type=hidden value="$form->{callback}">
878
879 <input type=hidden name=path value=$form->{path}>
880 <input type=hidden name=login value=$form->{login}>
881 <input type=hidden name=password value=$form->{password}>
882
883 <br><input type=submit class=submit name=action value="|
884     . $locale->text('Save') . qq|">
885 |;
886
887   if ($form->{id} && $form->{orphaned}) {
888     print qq|
889 <input type=submit class=submit name=action value="|
890       . $locale->text('Delete') . qq|">|;
891   }
892
893 <<<<<<< .mine
894   if ($form->{menubar}) {
895     require "$form->{path}/menu.pl";
896     &menubar;
897   }
898 # button for saving history
899 print qq|
900         <input type=button onclick=set_history_window(|
901         . $form->{id} 
902         . qq|); name=history id=history value=|
903         . $locale->text('history') 
904         . qq|>|;
905 # /button for saving history
906 =======
907 >>>>>>> .r1940
908   print qq|
909 </form>
910
911 </body>
912 </html>
913 |;
914
915   $lxdebug->leave_sub();
916 }