Revision af56822c
Von Werner Hahn vor etwa 7 Jahren hinzugefügt
SL/BackgroundJob/ShopOrderMassTransfer.pm | ||
---|---|---|
5 | 5 |
|
6 | 6 |
use parent qw(SL::BackgroundJob::Base); |
7 | 7 |
|
8 |
# |
|
9 |
# Workflow Dreschflegel Shoporder import -> wo geht automatisch nach Order(Auftrag) und DeliveryOrder (Lieferschein) mit auslagern transferieren |
|
10 |
# |
|
11 |
|
|
12 | 8 |
use SL::DBUtils; |
13 | 9 |
use SL::DB::ShopOrder; |
14 | 10 |
use SL::DB::ShopOrderItem; |
SL/Controller/ShopOrder.pm | ||
---|---|---|
34 | 34 |
push @{ $orders_fetched },@{ $new_orders }; |
35 | 35 |
}; |
36 | 36 |
$self->action_list; |
37 |
#TODO Flashinfo how many orders from wich shop have been fetched. infos in $orders_fetched |
|
38 | 37 |
} |
39 | 38 |
|
40 | 39 |
sub action_list { |
... | ... | |
153 | 152 |
die "Can't load shop_order form form->import_id" unless $self->shop_order; |
154 | 153 |
|
155 | 154 |
my $order = $self->shop_order->convert_to_sales_order(customer => $customer, employee => $employee); |
156 |
$main::lxdebug->dump(0, 'WH:OOO ',$order); |
|
157 | 155 |
|
158 | 156 |
if ($order->{error}){ |
159 | 157 |
flash_later('error',@{$order->{errors}}); |
SL/DB/ShopOrder.pm | ||
---|---|---|
77 | 77 |
)) { |
78 | 78 |
$shipto_id = $address->{shipto_id}; |
79 | 79 |
} else { |
80 |
my $gender = $self->{delivery_greeting} eq "Frau" ? 'f' : 'm'; |
|
81 | 80 |
my $deliveryaddress = SL::DB::Shipto->new; |
82 | 81 |
$deliveryaddress->assign_attributes( |
83 | 82 |
shiptoname => $self->{delivery_firstname} . " " . $self->{delivery_lastname}, |
84 | 83 |
shiptodepartment_1 => $self->{delivery_company}, |
85 | 84 |
shiptodepartment_2 => $self->{delivery_department}, |
86 |
shiptocp_gender => $gender, |
|
87 | 85 |
shiptostreet => $self->{delivery_street}, |
88 | 86 |
shiptozipcode => $self->{delivery_zipcode}, |
89 | 87 |
shiptocity => $self->{delivery_city}, |
js/kivi.ShopOrder.js | ||
---|---|---|
4 | 4 |
id: 'status_mass_transfer', |
5 | 5 |
dialog: { |
6 | 6 |
title: kivi.t8('Status Shoptransfer'), |
7 |
close: function(event, ui) { alert('CLOSE'); }, |
|
8 | 7 |
} |
9 | 8 |
}); |
10 | 9 |
}; |
templates/webpages/shop_order/list.html | ||
---|---|---|
1 | 1 |
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%] |
2 | 2 |
[% USE Dumper %] |
3 | 3 |
|
4 |
<h1>[% title %]</h1> |
|
4 |
<h1>[% title %]<span style="float:right;">[% 'Number data sets' | $T8 %]: [% SHOPORDERS.size %]</span></h1>
|
|
5 | 5 |
[%- PROCESS 'shop_order/_filter.html' filter=SELF.models.filtered.laundered %] |
6 | 6 |
|
7 | 7 |
<hr> |
8 |
<div class="table_info">[% 'Number data sets' | $T8 %]: [% SHOPORDERS.size %]</div> |
|
9 |
<table id="shoplist"> |
|
8 |
|
|
9 |
<table id="shoplist" width="100%">
|
|
10 | 10 |
<thead> |
11 | 11 |
<tr class="listheading"> |
12 | 12 |
<th>[% 'Shop Host' | $T8 %]</th> |
Auch abrufbar als: Unified diff
Shopmodul: Shoporder Debugs raus
gender bei Lieferadresse raus
Anzahl Shopbestellungen in Titelleiste