Revision 9d7c784c
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
446 | 446 |
##print $form->parse_html_template('is/_payments'); # parser |
447 | 447 |
##print $form->parse_html_template('webdav/_list'); # parser |
448 | 448 |
|
449 |
|
|
450 |
|
|
451 |
# print qq| |
|
452 |
# <tr> |
|
453 |
# <td> |
|
454 |
# <table width="100%"> |
|
455 |
# <tr valign="bottom"> |
|
456 |
# <td> |
|
457 |
# <table> |
|
458 |
# <tr> |
|
459 |
# <th align="left">| . $locale->text('Notes') . qq|</th> |
|
460 |
# <th align="left">| . $locale->text('Internal Notes') . qq|</th> |
|
461 |
# <th align="right">| . $locale->text('Payment Terms') . qq|</th> |
|
462 |
# </tr> |
|
463 |
# <tr valign="top"> |
|
464 |
# <td>$notes</td> |
|
465 |
# <td>$intnotes</td> |
|
466 |
# <td><select name="payment_id" onChange="if (this.value) set_duedate(['payment_id__' + this.value, 'invdate__' + invdate.value],['duedate'])">$payment |
|
467 |
# </select></td> |
|
468 |
# </tr> |
|
469 |
# $follow_ups_block |
|
470 |
# </table> |
|
471 |
# </td> |
|
472 |
# <td> |
|
473 |
# <table> |
|
474 |
# <tr> |
|
475 |
# <th align=left>| . $locale->text('Ertrag') . qq|</th> |
|
476 |
# <td>| . $form->format_amount(\%myconfig, $form->{marge_total}, 2, 0) . qq|</td> |
|
477 |
# </tr> |
|
478 |
# <tr> |
|
479 |
# <th align=left>| . $locale->text('Ertrag prozentual') . qq|</th> |
|
480 |
# <td>| . $form->format_amount(\%myconfig, $form->{marge_percent}, 2, 0) . qq| %</td> |
|
481 |
# </tr> |
|
482 |
# <input type=hidden name="marge_total" value="$form->{"marge_total"}"> |
|
483 |
# <input type=hidden name="marge_percent" value="$form->{"marge_percent"}"> |
|
484 |
# </table> |
|
485 |
# </td> |
|
486 |
# <td align="right"> |
|
487 |
# $taxincluded |
|
488 |
# <table> |
|
489 |
# $subtotal |
|
490 |
# $tax |
|
491 |
# <tr> |
|
492 |
# <th align="right">| . $locale->text('Total') . qq|</th> |
|
493 |
# <td align="right">$form->{invtotal}</td> |
|
494 |
# </tr> |
|
495 |
# </table> |
|
496 |
# </td> |
|
497 |
# </tr> |
|
498 |
# </table> |
|
499 |
# </td> |
|
500 |
# </tr> |
|
501 |
#|; |
|
502 |
# my $webdav_list; |
|
503 |
# if ($main::webdav) { |
|
504 |
# $webdav_list = qq| |
|
505 |
# <tr> |
|
506 |
# <td><hr size="3" noshade></td> |
|
507 |
# </tr> |
|
508 |
# <tr> |
|
509 |
# <th class="listtop" align="left">Dokumente im Webdav-Repository</th> |
|
510 |
# </tr> |
|
511 |
# <table width="100%"> |
|
512 |
# <td align="left" width="30%"><b>Dateiname</b></td> |
|
513 |
# <td align="left" width="70%"><b>Webdavlink</b></td> |
|
514 |
#|; |
|
515 |
# foreach my $file (@{ $form->{WEBDAV} }) { |
|
516 |
# $webdav_list .= qq| |
|
517 |
# <tr> |
|
518 |
# <td align="left">$file->{name}</td> |
|
519 |
# <td align="left"><a href="$file->{link}">$file->{type}</a></td> |
|
520 |
# </tr> |
|
521 |
#|; |
|
522 |
# } |
|
523 |
# $webdav_list .= qq| |
|
524 |
# </table> |
|
525 |
# </tr> |
|
526 |
#|; |
|
527 |
# |
|
528 |
# print $webdav_list; |
|
529 |
# } |
|
530 |
#if ($form->{type} eq "credit_note") { |
|
531 |
# print qq| |
|
532 |
# <tr> |
|
533 |
# <td> |
|
534 |
# <table width="100%"> |
|
535 |
# <tr class="listheading"> |
|
536 |
# <th colspan="6" class="listheading">| |
|
537 |
# . $locale->text('Payments') . qq|</th> |
|
538 |
# </tr> |
|
539 |
#|; |
|
540 |
#} else { |
|
541 |
# print qq| |
|
542 |
# <tr> |
|
543 |
# <td> |
|
544 |
# <table width="100%"> |
|
545 |
# <tr class="listheading"> |
|
546 |
# <th colspan="6" class="listheading">| |
|
547 |
# . $locale->text('Incoming Payments') . qq|</th> |
|
548 |
# </tr> |
|
549 |
#|; |
|
550 |
#} |
|
551 |
# |
|
552 |
# my @column_index; |
|
553 |
# if ($form->{currency} eq $form->{defaultcurrency}) { |
|
554 |
# @column_index = qw(datepaid source memo paid AR_paid); |
|
555 |
# } else { |
|
556 |
# @column_index = qw(datepaid source memo paid exchangerate AR_paid); |
|
557 |
# } |
|
558 |
# |
|
559 |
# my %column_data; |
|
560 |
# $column_data{datepaid} = "<th>" . $locale->text('Date') . "</th>"; |
|
561 |
# $column_data{paid} = "<th>" . $locale->text('Amount') . "</th>"; |
|
562 |
# $column_data{exchangerate} = "<th>" . $locale->text('Exch') . "</th>"; |
|
563 |
# $column_data{AR_paid} = "<th>" . $locale->text('Account') . "</th>"; |
|
564 |
# $column_data{source} = "<th>" . $locale->text('Source') . "</th>"; |
|
565 |
# $column_data{memo} = "<th>" . $locale->text('Memo') . "</th>"; |
|
566 |
# |
|
567 |
# print " |
|
568 |
# <tr> |
|
569 |
#"; |
|
570 |
# map { print "$column_data{$_}\n" } @column_index; |
|
571 |
# print " |
|
572 |
# </tr> |
|
573 |
#"; |
|
574 |
# |
|
575 |
# my @triggers = (); |
|
576 |
# my $totalpaid = 0; |
|
577 |
# |
|
578 |
# $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); |
|
579 |
# for my $i (1 .. $form->{paidaccounts}) { |
|
580 |
# |
|
581 |
# print " |
|
582 |
# <tr>\n"; |
|
583 |
# |
|
584 |
# $form->{"selectAR_paid_$i"} = $form->{selectAR_paid}; |
|
585 |
# $form->{"selectAR_paid_$i"} =~ |
|
586 |
# s/option>\Q$form->{"AR_paid_$i"}\E/option selected>$form->{"AR_paid_$i"}/; |
|
587 |
# |
|
588 |
# # format amounts |
|
589 |
# $totalpaid += $form->{"paid_$i"}; |
|
590 |
# if ($form->{"paid_$i"}) { |
|
591 |
# $form->{"paid_$i"} = $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2); |
|
592 |
# } |
|
593 |
# $form->{"exchangerate_$i"} = $form->format_amount(\%myconfig, $form->{"exchangerate_$i"}); |
|
594 |
# |
|
595 |
# if ($form->{"exchangerate_$i"} == 0) { |
|
596 |
# $form->{"exchangerate_$i"} = ""; |
|
597 |
# } |
|
598 |
# my $exchangerate = qq| |; |
|
599 |
# if ($form->{currency} ne $form->{defaultcurrency}) { |
|
600 |
# if ($form->{"forex_$i"}) { |
|
601 |
# $exchangerate = qq|<input type="hidden" name="exchangerate_$i" value="$form->{"exchangerate_$i"}">$form->{"exchangerate_$i"}|; |
|
602 |
# } else { |
|
603 |
# $exchangerate = qq|<input name="exchangerate_$i" size="10" value="$form->{"exchangerate_$i"}">|; |
|
604 |
# } |
|
605 |
# } |
|
606 |
# |
|
607 |
# $exchangerate .= qq|<input type="hidden" name="forex_$i" value="$form->{"forex_$i"}">|; |
|
608 |
# |
|
609 |
# $column_data{"paid_$i"} = |
|
610 |
# qq|<td align="center"><input name="paid_$i" size="11" value="$form->{"paid_$i"}" onBlur=\"check_right_number_format(this)\"></td>|; |
|
611 |
# $column_data{"exchangerate_$i"} = qq|<td align="center">$exchangerate</td>|; |
|
612 |
# $column_data{"AR_paid_$i"} = |
|
613 |
# qq|<td align="center"><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>|; |
|
614 |
# $column_data{"datepaid_$i"} = |
|
615 |
# qq|<td align="center"><input id="datepaid_$i" name="datepaid_$i" size="11" title="$myconfig{dateformat}" value="$form->{"datepaid_$i"}" onBlur=\"check_right_date_format(this)\"> |
|
616 |
# <input type="button" name="datepaid_$i" id="trigger_datepaid_$i" value="?"></td>|; |
|
617 |
# $column_data{"source_$i"} = |
|
618 |
# qq|<td align=center><input name="source_$i" size="11" value="$form->{"source_$i"}"></td>|; |
|
619 |
# $column_data{"memo_$i"} = |
|
620 |
# qq|<td align="center"><input name="memo_$i" size="11" value="$form->{"memo_$i"}"></td>|; |
|
621 |
# |
|
622 |
# map { print qq|$column_data{"${_}_$i"}\n| } @column_index; |
|
623 |
# print " |
|
624 |
# </tr>\n"; |
|
625 |
# push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); |
|
626 |
# } |
|
627 |
# |
|
628 |
# my $paid_missing = $form->{oldinvtotal} - $totalpaid; |
|
629 |
# |
|
630 |
# print qq| |
|
631 |
# <tr> |
|
632 |
# <td></td> |
|
633 |
# <td></td> |
|
634 |
# <td align="center">| . $locale->text('Total') . qq|</td> |
|
635 |
# <td align="center">| . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq|</td> |
|
636 |
# </tr> |
|
637 |
# <tr> |
|
638 |
# <td></td> |
|
639 |
# <td></td> |
|
640 |
# <td align="center">| . $locale->text('Missing amount') . qq|</td> |
|
641 |
# <td align="center">| . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq|</td> |
|
642 |
# </tr> |
|
643 |
#|; |
|
644 |
# |
|
645 |
# map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(paidaccounts selectAR_paid oldinvtotal)); |
|
646 |
# print qq|<input type="hidden" name="oldtotalpaid" value="$totalpaid"> |
|
647 |
# </table> |
|
648 |
# </td> |
|
649 |
# </tr> |
|
650 |
# <tr> |
|
651 |
# <td><hr size="3" noshade></td> |
|
652 |
# </tr> |
|
653 |
# <tr> |
|
654 |
# <td> |
|
655 |
#|; |
|
656 |
# |
|
657 |
# print_options(); |
|
658 |
# |
|
659 |
# print qq| |
|
660 |
# </td> |
|
661 |
# </tr> |
|
662 |
#</table> |
|
663 |
#|; |
|
664 |
# |
|
665 |
# my $invdate = $form->datetonum($form->{invdate}, \%myconfig); |
|
666 |
# my $closedto = $form->datetonum($form->{closedto}, \%myconfig); |
|
667 |
# |
|
668 |
# if ($form->{id}) { |
|
669 |
# my $show_storno = !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ar") && (($totalpaid == 0) || ($totalpaid eq "")); |
|
670 |
# |
|
671 |
# print qq| |
|
672 |
# <input class="submit" type="submit" accesskey="u" name="action" id="update_button" value="| . $locale->text('Update') . qq|"> |
|
673 |
# <input class="submit" type="submit" name="action" value="| . $locale->text('Ship to') . qq|"> |
|
674 |
# <input class="submit" type="submit" name="action" value="| . $locale->text('Print') . qq|"> |
|
675 |
# <input class="submit" type="submit" name="action" value="| . $locale->text('E-mail') . qq|"> |; |
|
676 |
# print qq|<input class="submit" type="submit" name="action" value="| . $locale->text('Storno') . qq|"> | if ($show_storno); |
|
677 |
# print qq|<input class="submit" type="submit" name="action" value="| . $locale->text('Post Payment') . qq|"> |; |
|
678 |
# print qq|<input class="submit" type="submit" name="action" value="| . $locale->text('Use As Template') . qq|"> |; |
|
679 |
# if ($form->{id} && !($form->{type} eq "credit_note")) { |
|
680 |
# print qq| <input class="submit" type="submit" name="action" value="| . $locale->text('Credit Note') . qq|"> |; |
|
681 |
# } |
|
682 |
# if ($form->{radier}) { |
|
683 |
# print qq| <input class="submit" type="submit" name="action" value="| . $locale->text('Delete') . qq|"> |; |
|
684 |
# } |
|
685 |
# |
|
686 |
# |
|
687 |
# if ($invdate > $closedto) { |
|
688 |
# print qq| <input class="submit" type="submit" name="action" value="| . $locale->text('Order') . qq|"> |; |
|
689 |
# } |
|
690 |
# |
|
691 |
# print qq| <input type="button" class="submit" onclick="follow_up_window()" value="| . $locale->text('Follow-Up') . qq|">|; |
|
692 |
# |
|
693 |
# } else { |
|
694 |
# if ($invdate > $closedto) { |
|
695 |
# print qq| |
|
696 |
# <input class="submit" type="submit" name="action" id="update_button" value="| . $locale->text('Update') . qq|"> |
|
697 |
# <input class="submit" type="submit" name="action" value="| . $locale->text('Ship to') . qq|"> |
|
698 |
# <input class="submit" type="submit" name="action" value="| . $locale->text('Preview') . qq|"> |
|
699 |
# <input class="submit" type="submit" name="action" value="| . $locale->text('E-mail') . qq|"> |
|
700 |
# <input class="submit" type="submit" name="action" value="| . $locale->text('Print and Post') . qq|"> |
|
701 |
# <input class="submit" type="submit" name="action" value="| . $locale->text('Post') . qq|"> | . |
|
702 |
# NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'), '-class' => 'submit')); |
|
703 |
# } |
|
704 |
# } |
|
705 |
# |
|
706 |
# # button for saving history |
|
707 |
# if($form->{id} ne "") { |
|
708 |
# print qq| |
|
709 |
# <input type="button" class="submit" onclick="set_history_window(| |
|
710 |
# . Q($form->{id}) |
|
711 |
# . qq|);" name="history" id="history" value="| |
|
712 |
# . $locale->text('history') |
|
713 |
# . qq|"> |; |
|
714 |
# } |
|
715 |
# # /button for saving history |
|
716 |
# |
|
717 |
# # mark_as_paid button |
|
718 |
# if($form->{id} ne "") { |
|
719 |
# print qq|<input type="submit" class="submit" name="action" value="| . $locale->text('mark as paid') . qq|">|; |
|
720 |
# } |
|
721 |
# # /mark_as_paid button |
|
722 |
# print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . |
|
723 |
# qq| |
|
724 |
# |
|
725 |
#<input type="hidden" name="rowcount" value="$form->{rowcount}"> |
|
726 |
#| . |
|
727 |
#$cgi->hidden("-name" => "callback", "-value" => $form->{callback}) |
|
728 |
#. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}]) |
|
729 |
#. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]) |
|
730 |
#. $cgi->hidden('-name' => 'customer_discount', '-value' => [$form->{customer_discount}]) |
|
731 |
#. qq| |
|
732 |
#</form> |
|
733 |
# |
|
734 |
#</body> |
|
735 |
# |
|
736 |
# </html> |
|
737 |
#|; |
|
738 |
|
|
739 | 449 |
$main::lxdebug->leave_sub(); |
740 | 450 |
} |
741 | 451 |
|
Auch abrufbar als: Unified diff
is.pl: alten code entfernt