Revision 2e07a0cd
Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
2706 | 2706 |
$main::lxdebug->leave_sub(); |
2707 | 2707 |
} |
2708 | 2708 |
|
2709 |
sub mark_as_paid { |
|
2710 |
$main::lxdebug->enter_sub(); |
|
2711 |
|
|
2712 |
my ($self, $myconfig, $db_name) = @_; |
|
2713 |
|
|
2714 |
if($self->{mark_as_paid}) { |
|
2715 |
my $dbh ||= $self->get_standard_dbh($myconfig); |
|
2716 |
my $query = qq|UPDATE $db_name SET paid = amount WHERE id = ?|; |
|
2717 |
do_query($self, $dbh, $query, $self->{id}); |
|
2718 |
$dbh->commit(); |
|
2719 |
$self->redirect($main::locale->text("Marked as paid")); |
|
2720 |
} |
|
2721 |
else { |
|
2722 |
my $referer = $ENV{HTTP_REFERER}; |
|
2723 |
$referer =~ s/^(.*)action\=.*\&(.*)$/$1action\=mark_as_paid\&mark_as_paid\=1\&login\=$self->{login}\&password\=$self->{password}\&id\=$self->{id}\&$2/; |
|
2724 |
$self->header(); |
|
2725 |
print qq|<body>|; |
|
2726 |
print qq|<p><b>|.$main::locale->text('Mark as paid?').qq|</b></p>|; |
|
2727 |
print qq|<input type="button" value="|.$main::locale->text('yes').qq|" onclick="document.location.href='|.$referer.qq|'"> |; |
|
2728 |
print qq|<input type="button" value="|.$main::locale->text('no').qq|" onclick="javascript:history.back();">|; |
|
2729 |
print qq|</body></html>|; |
|
2730 |
} |
|
2731 |
|
|
2732 |
$main::lxdebug->leave_sub(); |
|
2733 |
} |
|
2734 |
|
|
2735 | 2709 |
1; |
bin/mozilla/ap.pl | ||
---|---|---|
796 | 796 |
|
797 | 797 |
sub mark_as_paid { |
798 | 798 |
$lxdebug->enter_sub(); |
799 |
$form->mark_as_paid(\%myconfig,"ap");
|
|
799 |
&mark_as_paid_common(\%myconfig,"ap");
|
|
800 | 800 |
$lxdebug->leave_sub(); |
801 | 801 |
} |
802 | 802 |
|
bin/mozilla/ar.pl | ||
---|---|---|
838 | 838 |
|
839 | 839 |
sub mark_as_paid { |
840 | 840 |
$lxdebug->enter_sub(); |
841 |
$form->mark_as_paid(\%myconfig,"ar");
|
|
841 |
&mark_as_paid_common(\%myconfig,"ar");
|
|
842 | 842 |
$lxdebug->leave_sub(); |
843 | 843 |
} |
844 | 844 |
|
bin/mozilla/common.pl | ||
---|---|---|
565 | 565 |
$lxdebug->leave_sub(); |
566 | 566 |
} |
567 | 567 |
|
568 |
sub mark_as_paid_common { |
|
569 |
$lxdebug->enter_sub(); |
|
570 |
use SL::DBUtils; |
|
571 |
my ($myconfig, $db_name) = @_; |
|
572 |
|
|
573 |
if($form->{mark_as_paid}) { |
|
574 |
my $dbh ||= $form->get_standard_dbh($myconfig); |
|
575 |
my $query = qq|UPDATE $db_name SET paid = amount WHERE id = ?|; |
|
576 |
do_query($form, $dbh, $query, $form->{id}); |
|
577 |
$dbh->commit(); |
|
578 |
$form->redirect($locale->text("Marked as paid")); |
|
579 |
} |
|
580 |
else { |
|
581 |
my $referer = $ENV{HTTP_REFERER}; |
|
582 |
$referer =~ s/^(.*)action\=.*\&(.*)$/$1action\=mark_as_paid\&mark_as_paid\=1\&login\=$form->{login}\&password\=$form->{password}\&id\=$form->{id}\&$2/; |
|
583 |
$form->header(); |
|
584 |
print qq|<body>|; |
|
585 |
print qq|<p><b>|.$locale->text('Mark as paid?').qq|</b></p>|; |
|
586 |
print qq|<input type="button" value="|.$locale->text('yes').qq|" onclick="document.location.href='|.$referer.qq|'"> |; |
|
587 |
print qq|<input type="button" value="|.$locale->text('no').qq|" onclick="javascript:history.back();">|; |
|
588 |
print qq|</body></html>|; |
|
589 |
} |
|
590 |
|
|
591 |
$lxdebug->leave_sub(); |
|
592 |
} |
|
593 |
|
|
568 | 594 |
1; |
bin/mozilla/ir.pl | ||
---|---|---|
882 | 882 |
|
883 | 883 |
sub mark_as_paid { |
884 | 884 |
$lxdebug->enter_sub(); |
885 |
$form->mark_as_paid(\%myconfig,"ap");
|
|
885 |
&mark_as_paid_common(\%myconfig,"ap");
|
|
886 | 886 |
$lxdebug->leave_sub(); |
887 | 887 |
} |
888 | 888 |
|
bin/mozilla/is.pl | ||
---|---|---|
1200 | 1200 |
|
1201 | 1201 |
sub mark_as_paid { |
1202 | 1202 |
$lxdebug->enter_sub(); |
1203 |
$form->mark_as_paid(\%myconfig,"ar");
|
|
1203 |
&mark_as_paid_common(\%myconfig,"ar");
|
|
1204 | 1204 |
$lxdebug->leave_sub(); |
1205 | 1205 |
} |
1206 | 1206 |
|
locale/de/admin | ||
---|---|---|
144 | 144 |
'lock_system' => 'lock_system', |
145 | 145 |
'login' => 'login', |
146 | 146 |
'login_name' => 'login_name', |
147 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
147 | 148 |
'part_selection_internal' => 'part_selection_internal', |
148 | 149 |
'pg_database_administration' => 'pg_database_administration', |
149 | 150 |
'project_selection_internal' => 'project_selection_internal', |
locale/de/am | ||
---|---|---|
351 | 351 |
'list_lead' => 'list_lead', |
352 | 352 |
'list_payment' => 'list_payment', |
353 | 353 |
'list_printer' => 'list_printer', |
354 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
354 | 355 |
'part_selection_internal' => 'part_selection_internal', |
355 | 356 |
'payment_header' => 'payment_header', |
356 | 357 |
'printer_header' => 'printer_header', |
locale/de/amtemplates | ||
---|---|---|
107 | 107 |
'edit_template' => 'edit_template', |
108 | 108 |
'employee_selection_internal' => 'employee_selection_internal', |
109 | 109 |
'format_dates' => 'format_dates', |
110 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
110 | 111 |
'part_selection_internal' => 'part_selection_internal', |
111 | 112 |
'project_selection_internal' => 'project_selection_internal', |
112 | 113 |
'reformat_numbers' => 'reformat_numbers', |
locale/de/ap | ||
---|---|---|
223 | 223 |
'load_draft' => 'load_draft', |
224 | 224 |
'load_draft_maybe' => 'load_draft_maybe', |
225 | 225 |
'mark_as_paid' => 'mark_as_paid', |
226 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
226 | 227 |
'name_selected' => 'name_selected', |
227 | 228 |
'part_selection_internal' => 'part_selection_internal', |
228 | 229 |
'post' => 'post', |
locale/de/ar | ||
---|---|---|
232 | 232 |
'load_draft' => 'load_draft', |
233 | 233 |
'load_draft_maybe' => 'load_draft_maybe', |
234 | 234 |
'mark_as_paid' => 'mark_as_paid', |
235 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
235 | 236 |
'name_selected' => 'name_selected', |
236 | 237 |
'part_selection_internal' => 'part_selection_internal', |
237 | 238 |
'post' => 'post', |
locale/de/arap | ||
---|---|---|
103 | 103 |
'employee_selection_internal' => 'employee_selection_internal', |
104 | 104 |
'format_dates' => 'format_dates', |
105 | 105 |
'gl_transaction' => 'gl_transaction', |
106 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
106 | 107 |
'name_selected' => 'name_selected', |
107 | 108 |
'part_selection_internal' => 'part_selection_internal', |
108 | 109 |
'project_selected' => 'project_selected', |
locale/de/bp | ||
---|---|---|
125 | 125 |
'employee_selection_internal' => 'employee_selection_internal', |
126 | 126 |
'format_dates' => 'format_dates', |
127 | 127 |
'list_spool' => 'list_spool', |
128 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
128 | 129 |
'part_selection_internal' => 'part_selection_internal', |
129 | 130 |
'print' => 'print', |
130 | 131 |
'project_selection_internal' => 'project_selection_internal', |
locale/de/common | ||
---|---|---|
86 | 86 |
'delivery_customer_selection' => 'delivery_customer_selection', |
87 | 87 |
'employee_selection_internal' => 'employee_selection_internal', |
88 | 88 |
'format_dates' => 'format_dates', |
89 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
89 | 90 |
'part_selection_internal' => 'part_selection_internal', |
90 | 91 |
'project_selection_internal' => 'project_selection_internal', |
91 | 92 |
'reformat_numbers' => 'reformat_numbers', |
locale/de/cp | ||
---|---|---|
148 | 148 |
'format_dates' => 'format_dates', |
149 | 149 |
'gl_transaction' => 'gl_transaction', |
150 | 150 |
'list_invoices' => 'list_invoices', |
151 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
151 | 152 |
'name_selected' => 'name_selected', |
152 | 153 |
'part_selection_internal' => 'part_selection_internal', |
153 | 154 |
'payment' => 'payment', |
locale/de/ct | ||
---|---|---|
196 | 196 |
'get_delivery' => 'get_delivery', |
197 | 197 |
'get_shipto' => 'get_shipto', |
198 | 198 |
'list_names' => 'list_names', |
199 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
199 | 200 |
'part_selection_internal' => 'part_selection_internal', |
200 | 201 |
'project_selection_internal' => 'project_selection_internal', |
201 | 202 |
'reformat_numbers' => 'reformat_numbers', |
locale/de/datev | ||
---|---|---|
132 | 132 |
'export_bewegungsdaten' => 'export_bewegungsdaten', |
133 | 133 |
'export_stammdaten' => 'export_stammdaten', |
134 | 134 |
'format_dates' => 'format_dates', |
135 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
135 | 136 |
'part_selection_internal' => 'part_selection_internal', |
136 | 137 |
'project_selection_internal' => 'project_selection_internal', |
137 | 138 |
'reformat_numbers' => 'reformat_numbers', |
locale/de/dn | ||
---|---|---|
226 | 226 |
'gl_transaction' => 'gl_transaction', |
227 | 227 |
'invoicetotal' => 'invoicetotal', |
228 | 228 |
'item_selected' => 'item_selected', |
229 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
229 | 230 |
'name_selected' => 'name_selected', |
230 | 231 |
'new_item' => 'new_item', |
231 | 232 |
'new_license' => 'new_license', |
locale/de/drafts | ||
---|---|---|
94 | 94 |
'format_dates' => 'format_dates', |
95 | 95 |
'load_draft' => 'load_draft', |
96 | 96 |
'load_draft_maybe' => 'load_draft_maybe', |
97 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
97 | 98 |
'part_selection_internal' => 'part_selection_internal', |
98 | 99 |
'project_selection_internal' => 'project_selection_internal', |
99 | 100 |
'reformat_numbers' => 'reformat_numbers', |
locale/de/gl | ||
---|---|---|
213 | 213 |
'generate_report' => 'generate_report', |
214 | 214 |
'gl_subtotal' => 'gl_subtotal', |
215 | 215 |
'gl_transaction' => 'gl_transaction', |
216 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
216 | 217 |
'name_selected' => 'name_selected', |
217 | 218 |
'part_selection_internal' => 'part_selection_internal', |
218 | 219 |
'post' => 'post', |
locale/de/ic | ||
---|---|---|
310 | 310 |
'link_part' => 'link_part', |
311 | 311 |
'list' => 'list', |
312 | 312 |
'makemodel_row' => 'makemodel_row', |
313 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
313 | 314 |
'new_item' => 'new_item', |
314 | 315 |
'new_license' => 'new_license', |
315 | 316 |
'order' => 'order', |
locale/de/io | ||
---|---|---|
189 | 189 |
'format_dates' => 'format_dates', |
190 | 190 |
'invoicetotal' => 'invoicetotal', |
191 | 191 |
'item_selected' => 'item_selected', |
192 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
192 | 193 |
'new_item' => 'new_item', |
193 | 194 |
'new_license' => 'new_license', |
194 | 195 |
'order' => 'order', |
locale/de/ir | ||
---|---|---|
279 | 279 |
'load_draft' => 'load_draft', |
280 | 280 |
'load_draft_maybe' => 'load_draft_maybe', |
281 | 281 |
'mark_as_paid' => 'mark_as_paid', |
282 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
282 | 283 |
'name_selected' => 'name_selected', |
283 | 284 |
'new_item' => 'new_item', |
284 | 285 |
'new_license' => 'new_license', |
locale/de/is | ||
---|---|---|
306 | 306 |
'load_draft' => 'load_draft', |
307 | 307 |
'load_draft_maybe' => 'load_draft_maybe', |
308 | 308 |
'mark_as_paid' => 'mark_as_paid', |
309 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
309 | 310 |
'name_selected' => 'name_selected', |
310 | 311 |
'new_item' => 'new_item', |
311 | 312 |
'new_license' => 'new_license', |
locale/de/licenses | ||
---|---|---|
122 | 122 |
'form_footer' => 'form_footer', |
123 | 123 |
'form_header' => 'form_header', |
124 | 124 |
'format_dates' => 'format_dates', |
125 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
125 | 126 |
'part_selection_internal' => 'part_selection_internal', |
126 | 127 |
'print_customer_selection' => 'print_customer_selection', |
127 | 128 |
'print_license_form' => 'print_license_form', |
locale/de/login | ||
---|---|---|
103 | 103 |
'login' => 'login', |
104 | 104 |
'login_screen' => 'login_screen', |
105 | 105 |
'logout' => 'logout', |
106 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
106 | 107 |
'part_selection_internal' => 'part_selection_internal', |
107 | 108 |
'project_selection_internal' => 'project_selection_internal', |
108 | 109 |
'reformat_numbers' => 'reformat_numbers', |
locale/de/oe | ||
---|---|---|
313 | 313 |
'invoice' => 'invoice', |
314 | 314 |
'invoicetotal' => 'invoicetotal', |
315 | 315 |
'item_selected' => 'item_selected', |
316 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
316 | 317 |
'name_selected' => 'name_selected', |
317 | 318 |
'new_item' => 'new_item', |
318 | 319 |
'new_license' => 'new_license', |
locale/de/pe | ||
---|---|---|
131 | 131 |
'form_project_footer' => 'form_project_footer', |
132 | 132 |
'form_project_header' => 'form_project_header', |
133 | 133 |
'format_dates' => 'format_dates', |
134 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
134 | 135 |
'part_selection_internal' => 'part_selection_internal', |
135 | 136 |
'partsgroup_report' => 'partsgroup_report', |
136 | 137 |
'pricegroup_report' => 'pricegroup_report', |
locale/de/rc | ||
---|---|---|
112 | 112 |
'employee_selection_internal' => 'employee_selection_internal', |
113 | 113 |
'format_dates' => 'format_dates', |
114 | 114 |
'get_payments' => 'get_payments', |
115 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
115 | 116 |
'part_selection_internal' => 'part_selection_internal', |
116 | 117 |
'project_selection_internal' => 'project_selection_internal', |
117 | 118 |
'reconciliation' => 'reconciliation', |
locale/de/rp | ||
---|---|---|
228 | 228 |
'gl_transaction' => 'gl_transaction', |
229 | 229 |
'list_accounts' => 'list_accounts', |
230 | 230 |
'list_payments' => 'list_payments', |
231 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
231 | 232 |
'name_selected' => 'name_selected', |
232 | 233 |
'part_selection_internal' => 'part_selection_internal', |
233 | 234 |
'print' => 'print', |
locale/de/ustva | ||
---|---|---|
171 | 171 |
'generate_ustva' => 'generate_ustva', |
172 | 172 |
'gl_transaction' => 'gl_transaction', |
173 | 173 |
'help' => 'help', |
174 |
'mark_as_paid_common' => 'mark_as_paid_common', |
|
174 | 175 |
'name_selected' => 'name_selected', |
175 | 176 |
'part_selection_internal' => 'part_selection_internal', |
176 | 177 |
'project_selected' => 'project_selected', |
Auch abrufbar als: Unified diff
"Als bezahlt markieren" Button-Funktion in die common.pl verlegt.