Revision 53a98e07
Von Tamino Steinert vor 3 Monaten hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
1844 | 1844 |
$order = SL::Model::Record->update_after_customer_vendor_change($order); |
1845 | 1845 |
} |
1846 | 1846 |
|
1847 |
my $form_orderitems = delete $::form->{order}->{orderitems}; |
|
1848 |
my $form_periodic_invoices_config = delete $::form->{order}->{periodic_invoices_config}; |
|
1847 |
# don't assign hashes as objects |
|
1848 |
my $form_orderitems = delete $::form->{order}->{orderitems}; |
|
1849 |
my $form_periodic_invoices_config = delete $::form->{order}->{periodic_invoices_config}; |
|
1849 | 1850 |
|
1850 | 1851 |
$order->assign_attributes(%{$::form->{order}}); |
1851 | 1852 |
|
1853 |
# restore form values |
|
1854 |
$::form->{order}->{orderitems} = $form_orderitems; |
|
1855 |
$::form->{order}->{periodic_invoices_config} = $form_periodic_invoices_config; |
|
1856 |
|
|
1852 | 1857 |
$self->setup_custom_shipto_from_form($order, $::form); |
1853 | 1858 |
|
1854 |
if (my $periodic_invoices_config_attrs = $form_periodic_invoices_config ? SL::YAML::Load($form_periodic_invoices_config) : undef) { |
|
1855 |
my $periodic_invoices_config = $order->periodic_invoices_config || $order->periodic_invoices_config(SL::DB::PeriodicInvoicesConfig->new); |
|
1856 |
$periodic_invoices_config->assign_attributes(%$periodic_invoices_config_attrs); |
|
1859 |
if ( |
|
1860 |
my $periodic_invoices_config_attrs = $form_periodic_invoices_config ? |
|
1861 |
SL::YAML::Load($form_periodic_invoices_config) |
|
1862 |
: undef |
|
1863 |
) { |
|
1864 |
my $periodic_invoices_config = |
|
1865 |
$order->periodic_invoices_config |
|
1866 |
|| $order->periodic_invoices_config(SL::DB::PeriodicInvoicesConfig->new); |
|
1867 |
$periodic_invoices_config->assign_attributes( |
|
1868 |
%$periodic_invoices_config_attrs |
|
1869 |
); |
|
1857 | 1870 |
} |
1858 | 1871 |
|
1859 | 1872 |
# remove deleted items |
Auch abrufbar als: Unified diff
FIX: S:C:Order: Positionen behalten bei 'Artikel aus Beleg anlegen'