Revision bebdc2ce
Von Moritz Bunkus vor etwa 3 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
841 | 841 |
is_new => $is_new, |
842 | 842 |
); |
843 | 843 |
|
844 |
$self->_set_project_in_linked_requirement_spec( |
|
845 |
type => $form->{type}, |
|
846 |
project_id => $form->{globalproject_id}, |
|
847 |
sales_order_id => $form->{id}, |
|
848 |
); |
|
849 |
|
|
844 | 850 |
$main::lxdebug->leave_sub(); |
845 | 851 |
|
846 | 852 |
return 1; |
... | ... | |
880 | 886 |
}); |
881 | 887 |
} |
882 | 888 |
|
889 |
sub _set_project_in_linked_requirement_spec { |
|
890 |
my ($self, %params) = @_; |
|
891 |
|
|
892 |
return if $params{type} ne 'sales_order'; |
|
893 |
return if !$params{project_id} || !$params{sales_order_id}; |
|
894 |
|
|
895 |
my $query = <<SQL; |
|
896 |
UPDATE requirement_specs |
|
897 |
SET project_id = ? |
|
898 |
WHERE id IN ( |
|
899 |
SELECT so.requirement_spec_id |
|
900 |
FROM requirement_spec_orders so |
|
901 |
WHERE so.order_id = ? |
|
902 |
) |
|
903 |
SQL |
|
904 |
|
|
905 |
do_query($::form, $::form->get_standard_dbh, $query, $params{project_id}, $params{sales_order_id}); |
|
906 |
} |
|
907 |
|
|
883 | 908 |
sub save_periodic_invoices_config { |
884 | 909 |
my ($self, %params) = @_; |
885 | 910 |
|
Auch abrufbar als: Unified diff
Auftrag: Projekt automatisch in verknüpftem Pflichtenheft eintragen