Revision 17409513
Von Moritz Bunkus vor etwa 15 Jahren hinzugefügt
bin/mozilla/wh.pl | ||
---|---|---|
600 | 600 |
$form->{sort} ||= 'date'; |
601 | 601 |
|
602 | 602 |
my %filter; |
603 |
my @columns = qw(trans_id date warehouse_from bin_from warehouse_to bin_to partnumber partdescription chargenumber trans_type comment qty employee projectnumber); |
|
603 |
my @columns = qw(trans_id date warehouse_from bin_from warehouse_to bin_to partnumber partdescription chargenumber trans_type comment qty employee oe_id projectnumber);
|
|
604 | 604 |
|
605 | 605 |
# filter stuff |
606 | 606 |
map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id partnumber description chargenumber); |
... | ... | |
635 | 635 |
'qty' => { 'text' => $locale->text('Qty'), }, |
636 | 636 |
'employee' => { 'text' => $locale->text('Employee'), }, |
637 | 637 |
'projectnumber' => { 'text' => $locale->text('Project Number'), }, |
638 |
'oe_id' => { 'text' => $locale->text('Document'), }, |
|
638 | 639 |
); |
639 | 640 |
|
640 | 641 |
my $href = build_std_url('action=generate_journal', grep { $form->{$_} } @hidden_variables); |
... | ... | |
659 | 660 |
my $all_units = AM->retrieve_units(\%myconfig, $form); |
660 | 661 |
my @contents = WH->get_warehouse_journal(%filter); |
661 | 662 |
|
663 |
my %doc_types = ( 'sales_quotation' => { script => 'oe', title => $locale->text('Sales quotation') }, |
|
664 |
'sales_order' => { script => 'oe', title => $locale->text('Sales Order') }, |
|
665 |
'request_quotation' => { script => 'oe', title => $locale->text('Request quotation') }, |
|
666 |
'purchase_order' => { script => 'oe', title => $locale->text('Purchase Order') }, |
|
667 |
'sales_delivery_order' => { script => 'do', title => $locale->text('Sales delivery order') }, |
|
668 |
'purchase_delivery_order' => { script => 'do', title => $locale->text('Purchase delivery order') }, |
|
669 |
'sales_invoice' => { script => 'is', title => $locale->text('Sales Invoice') }, |
|
670 |
'purchase_invoice' => { script => 'ir', title => $locale->text('Purchase Invoice') }, |
|
671 |
); |
|
672 |
|
|
662 | 673 |
foreach $entry (@contents) { |
663 | 674 |
$entry->{qty} = $form->format_amount_units('amount' => $entry->{qty}, |
664 | 675 |
'part_unit' => $entry->{partunit}, |
... | ... | |
681 | 692 |
'align' => $column_alignment{trans_type}, |
682 | 693 |
}; |
683 | 694 |
|
695 |
if ($form->{l_oe_id}) { |
|
696 |
$row->{oe_id}->{data} = ''; |
|
697 |
my $info = $entry->{oe_id_info}; |
|
698 |
|
|
699 |
if ($info && $info->{id} && $info->{type} && $doc_types{$info->{type}}) { |
|
700 |
$row->{oe_id} = { data => $doc_types{ $info->{type} }->{title} . ' ' . $info->{number}, |
|
701 |
link => build_std_url('script=' . $doc_types{ $info->{type} }->{script} . '.pl', 'action=edit', 'id=' . $info->{id}, 'type=' . $info->{type}) }; |
|
702 |
} |
|
703 |
} |
|
704 |
|
|
684 | 705 |
$report->add_data($row); |
685 | 706 |
} |
686 | 707 |
|
Auch abrufbar als: Unified diff
Anzeige einer Spalte "Dokument" im Lagerbewegungsbericht mit Verlinkung auf den Beleg, von dem aus Waren ein-/ausgelagert wurden.
Ist nur mit Lieferscheinen getestet, weil bisher nur von
Lieferscheinen aus direkt ein-/ausgelagert werden kann, aber der
Mechanismus ist bereits für alle Verkaufs- und Einkaufsbelege
implementiert.
Fix für Bug 1058.