Revision f3a02fb6
Von Jan Büren vor mehr als 8 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
758 | 758 |
$form->save_status($dbh); |
759 | 759 |
|
760 | 760 |
# Link this record to the records it was created from. |
761 |
# check every record type we may link. i am not happy with converting the string to array back |
|
762 |
# should be a array from the start (OE.pm -> retrieve). |
|
763 |
# and that i need the local array ref for close_quotation_rfqs. better ideas welcome |
|
764 | 761 |
$form->{convert_from_oe_ids} =~ s/^\s+//; |
765 | 762 |
$form->{convert_from_oe_ids} =~ s/\s+$//; |
766 | 763 |
my @convert_from_oe_ids = split m/\s+/, $form->{convert_from_oe_ids}; |
767 | 764 |
delete $form->{convert_from_oe_ids}; |
768 |
@{ $form->{convert_from_oe_ids} } = @convert_from_oe_ids; |
|
769 |
foreach (qw(ar oe)) { |
|
770 |
if (!$form->{useasnew} && $form->{"convert_from_${_}_ids"}) { |
|
771 |
RecordLinks->create_links('dbh' => $dbh, |
|
772 |
'mode' => 'ids', |
|
773 |
'from_table' => $_, |
|
774 |
'from_ids' => $form->{"convert_from_${_}_ids"}, |
|
775 |
'to_table' => 'oe', |
|
776 |
'to_id' => $form->{id}, |
|
777 |
); |
|
778 |
delete $form->{"convert_from_${_}_ids"}; |
|
779 |
} |
|
765 |
if (scalar @convert_from_oe_ids) { |
|
766 |
RecordLinks->create_links('dbh' => $dbh, |
|
767 |
'mode' => 'ids', |
|
768 |
'from_table' => 'oe', |
|
769 |
'from_ids' => \@convert_from_oe_ids, |
|
770 |
'to_table' => 'oe', |
|
771 |
'to_id' => $form->{id}, |
|
772 |
); |
|
780 | 773 |
$self->_close_quotations_rfqs('dbh' => $dbh, |
781 | 774 |
'from_id' => \@convert_from_oe_ids, |
782 |
'to_id' => $form->{id}) if $_ eq 'oe';
|
|
775 |
'to_id' => $form->{id}); |
|
783 | 776 |
} |
784 | 777 |
|
785 | 778 |
if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) { |
... | ... | |
927 | 920 |
|
928 | 921 |
# if called in multi id mode, and still only got one id, switch back to single id |
929 | 922 |
if ($form->{"rowcount"} and $#ids == 0) { |
930 |
$form->{"id"} = $ids[0];
|
|
923 |
$form->{"id"} = $ids[0]; |
|
931 | 924 |
undef @ids; |
932 | 925 |
delete $form->{convert_from_oe_ids}; |
933 | 926 |
} |
bin/mozilla/io.pl | ||
---|---|---|
888 | 888 |
$form->{old_employee_id} = $form->{employee_id}; |
889 | 889 |
$form->{old_salesman_id} = $form->{salesman_id}; |
890 | 890 |
|
891 |
# link doc invoice -> quotation (single id no multi mode) |
|
892 |
$form->{convert_from_ar_ids} = delete $form->{id}; |
|
893 |
|
|
894 |
delete $form->{$_} foreach (qw(printed emailed queued)); |
|
891 |
map { delete $form->{$_} } qw(id printed emailed queued); |
|
895 | 892 |
my $buysell; |
896 | 893 |
if ($form->{script} eq 'ir.pl' || $form->{type} eq 'request_quotation') { |
897 | 894 |
$form->{title} = $locale->text('Add Purchase Order'); |
... | ... | |
954 | 951 |
if ($form->{type} =~ /(sales|purchase)_order/) { |
955 | 952 |
$form->{"converted_from_orderitems_id_$_"} = delete $form->{"orderitems_id_$_"} for 1 .. $form->{"rowcount"}; |
956 | 953 |
} |
957 |
# link doc order -> quotation (single id no multi mode) |
|
958 |
$form->{convert_from_oe_ids} = delete $form->{id}; |
|
959 |
|
|
960 | 954 |
if ($form->{second_run}) { |
961 | 955 |
$form->{print_and_post} = 0; |
962 | 956 |
} |
963 |
delete $form->{$_} foreach (qw(printed emailed queued));
|
|
957 |
map { delete $form->{$_} } qw(id printed emailed queued);
|
|
964 | 958 |
|
965 | 959 |
my $buysell; |
966 | 960 |
if ($form->{script} eq 'ir.pl' || $form->{type} eq 'purchase_order') { |
templates/webpages/oe/form_header.html | ||
---|---|---|
19 | 19 |
[%- END %] |
20 | 20 |
|
21 | 21 |
<input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]"> |
22 |
<input type="hidden" name="convert_from_ar_ids" value="[% HTML.escape(convert_from_ar_ids) %]"> |
|
23 | 22 |
|
24 | 23 |
<input type="hidden" name="follow_up_trans_id_1" value="[% HTML.escape(id) %]"> |
25 | 24 |
<input type="hidden" name="follow_up_trans_type_1" value="[% HTML.escape(type) %]"> |
Auch abrufbar als: Unified diff
Revert "Ticket 29 Verknüpfte Belege -> keine Verknüpfung von Rechnung nach Auftrag"
This reverts commit 77350196300e930abc7de0df7dbf42e8cd6193b8.
Conflicts:
SL/OE.pm