Revision 038e3d02
Von Werner Hahn vor mehr als 8 Jahren hinzugefügt
SL/Controller/MassInvoiceCreatePrint.pm | ||
---|---|---|
217 | 217 |
query => [ |
218 | 218 |
'!customer_id' => undef, |
219 | 219 |
or => [ closed => undef, closed => 0 ], |
220 |
#or => [ delivered => undef, delivered => 0 ], |
|
221 |
'!transaction_description' => { 'ilike' => '%herbst%'}, |
|
220 | 222 |
], |
221 | 223 |
); |
222 | 224 |
} |
SL/Controller/ShopOrder.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use parent qw(SL::Controller::Base); |
6 | 6 |
|
7 |
use SL::BackgroundJob::ShopOrder; |
|
8 |
use SL::System::TaskServer; |
|
7 | 9 |
use SL::DB::ShopOrder; |
8 | 10 |
use SL::DB::ShopOrderItem; |
9 | 11 |
use SL::DB::Shop; |
... | ... | |
135 | 137 |
$self->redirect_to(controller => "oe.pl", action => 'edit', type => 'sales_order', vc => 'customer', id => $order->id); |
136 | 138 |
} |
137 | 139 |
|
140 |
sub action_mass_transfer { |
|
141 |
my ($self) = @_; |
|
142 |
my $today = DateTime->today_local; |
|
143 |
my @shop_orders = @{ $::form->{id} || [] }; |
|
144 |
$::lxdebug->dump(0, 'WH: MT II', \@shop_orders); |
|
145 |
|
|
146 |
my $job = SL::DB::BackgroundJob->new( |
|
147 |
type => 'once', |
|
148 |
active => 1, |
|
149 |
package_name => 'ShopOrder', |
|
150 |
)->set_data( |
|
151 |
shop_order_record_ids => [ 603, 604, 605], |
|
152 |
transdate => $today, |
|
153 |
num_order_created => 0, |
|
154 |
num_delivery_order_created => 0, |
|
155 |
conversation_errors => [ ], |
|
156 |
)->update_next_run_at; |
|
157 |
|
|
158 |
SL::System::TaskServer->new->wake_up; |
|
159 |
|
|
160 |
} |
|
161 |
|
|
138 | 162 |
sub action_apply_customer { |
139 | 163 |
my ( $self ) = @_; |
140 | 164 |
$::lxdebug->dump(0, "WH: CUSTOMER ", \$::form); |
SL/DB/ShopOrder.pm | ||
---|---|---|
49 | 49 |
|
50 | 50 |
my $shipto_id; |
51 | 51 |
if ($self->{billing_firstname} ne $self->{delivery_firstname} || $self->{billing_lastname} ne $self->{delivery_lastname} || $self->{billing_city} ne $self->{delivery_city} || $self->{billing_street} ne $self->{delivery_street}) { |
52 |
if(my $address = SL::DB::Manager::Shipto->find_by( shiptoname => $self->{delivery_firstname} . " " . $self->{delivery_lastname},
|
|
52 |
if(my $address = SL::DB::Manager::Shipto->find_by( shiptoname => $self->{delivery_firstname} . " " . $self->{delivery_lastname}, |
|
53 | 53 |
shiptostreet => $self->{delivery_street}, |
54 | 54 |
shiptocity => $self->{delivery_city}, |
55 | 55 |
)) { |
templates/webpages/shop_order/list.html | ||
---|---|---|
4 | 4 |
<h1>[% title %]</h1> |
5 | 5 |
[%- PROCESS 'shop_order/_filter.html' filter=SELF.models.filtered.laundered %] |
6 | 6 |
<hr> |
7 |
<form method="post" action="controller.pl"> |
|
7 | 8 |
<table id="shoplist"> |
8 | 9 |
<thead> |
9 | 10 |
<tr class="listheading"> |
... | ... | |
143 | 144 |
<b>[% HTML.escape(shop_order.billing_lastname) %], [% HTML.escape(shop_order.billing_firstname) %]</b> |
144 | 145 |
<br>[% HTML.escape(shop_order.billing_street) %] |
145 | 146 |
<br>[% HTML.escape(shop_order.billing_zipcode) %] [% HTML.escape(shop_order.billing_city) %] |
146 |
<br>[% HTML.escape(shop_order.billing_country) %] </td> |
|
147 |
<br>[% HTML.escape(shop_order.billing_country) %] |
|
148 |
<br>[% HTML.escape(shop_order.kivi_cv_id.customernumber) %]</td> |
|
147 | 149 |
[% IF (shop_order.delivery_lastname != shop_order.billing_lastname || shop_order.delivery_firstname != shop_order.billing_firstname || shop_order.delivery_street != shop_order.billing_street || shop_order.delivery_city != shop_order.billing_city) %] [% SET deliveryclass = 'style="background-color:red;"' %] [% ELSE %] [% SET deliveryclass = '' %] [% END %] |
148 | 150 |
<td [% deliveryclass %]>[% IF shop_order.customer_company %]<b>[% HTML.escape(shop_order.customer_company) %]</b><br>[% END %] |
149 | 151 |
<b>[% HTML.escape(shop_order.delivery_lastname) %], [% HTML.escape(shop_order.delivery_firstname) %]</b> |
... | ... | |
153 | 155 |
<td>[% HTML.escape(shop_order.shop_customer_comment) %]</td> |
154 | 156 |
<td>[% shop_order.shop_order_items.size %]<br>[% shop_order.amount_as_number %]<br>[% shop_order.shipping_costs_as_number %]</td> |
155 | 157 |
<td>[% IF shop_order.transferred == 1 %]<a href="controller.pl?id=[% shop_order.id %]&action=ShopOrder/show">[% 'Show order' | $T8 %]<br>[% shop_order.transferred_date_as_date %]</a> |
156 |
[% ELSE %]<a href="controller.pl?id=[% shop_order.id %]&action=ShopOrder/show">[% 'Create order' | $T8 %][% END %]</a></td> |
|
158 |
[% ELSE %] |
|
159 |
[% L.checkbox_tag('id[]', checked = transferable, value=shop_order.id) %]<br> |
|
160 |
<a href="controller.pl?id=[% shop_order.id %]&action=ShopOrder/show">[% 'Create order' | $T8 %][% END %]</a></td> |
|
157 | 161 |
</tr> |
158 | 162 |
[% END %] |
159 | 163 |
</table> |
164 |
<hr> |
|
165 |
<p> |
|
166 |
[% L.hidden_tag("action", "ShopOrder/mass_transfer") %] |
|
167 |
[% L.submit_tag("", LxERP.t8("Transfer all marked")) %] |
|
168 |
</p> |
|
169 |
</form> |
Auch abrufbar als: Unified diff
shopOrder backgroundshop anfang
Conflicts:
SL/Controller/MassInvoiceCreatePrint.pm