Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision db148322

Von Werner Hahn vor mehr als 7 Jahren hinzugefügt

  • ID db1483221a23f2958eb378891bcb690e02be9c3a
  • Vorgänger c8598827
  • Nachfolger a3c2c4fc

Shopmodul: Shopdropdown berichtigt, Importzeit und Shopname anstatt Shop
Host in Tabelle Shoporders

Unterschiede anzeigen:

SL/Controller/ShopOrder.pm
61 61

  
62 62
sub action_list {
63 63
  my ( $self ) = @_;
64

  
64 65
  my %filter = ($::form->{filter} ? parse_filter($::form->{filter}) : query => [ transferred => 0, obsolete => 0 ]);
65 66
  my $transferred = $::form->{filter}->{transferred_eq_ignore_empty} ne '' ? $::form->{filter}->{transferred_eq_ignore_empty} : '';
66 67
  my $sort_by = $::form->{sort_by} ? $::form->{sort_by} : 'order_date';
67 68
  $sort_by .=$::form->{sort_dir} ? ' DESC' : ' ASC';
68 69
  my $shop_orders = SL::DB::Manager::ShopOrder->get_all( %filter, sort_by => $sort_by,
69
                                                      with_objects => ['shop_order_items', 'kivi_customer'],
70
                                                      with_objects => ['shop_order_items', 'kivi_customer', 'shop'],
70 71
                                                    );
71 72

  
72 73
  foreach my $shop_order(@{ $shop_orders }){
SL/DB/Shop.pm
26 26
sub shops_dd {
27 27
  my ( $self ) = @_;
28 28

  
29
  my @shops_dd = [ { title => t8("all") ,   value =>'' } ];
29
  my @shops_dd = ( { title => t8("all") ,   value =>'' } );
30 30
  my $shops = SL::DB::Manager::Shop->get_all( where => [ obsolete => 0 ] );
31 31
  my @tmp = map { { title => $_->{description}, value => $_->{id} } } @{ $shops } ;
32 32
  push @shops_dd, @tmp;
templates/webpages/shop_order/list.html
10 10
 <table id="shoplist" width="100%">
11 11
  <thead>
12 12
   <tr class="listheading">
13
    <th>[% 'Shop Host' | $T8 %]</th>
13
    <th>[% 'Shop' | $T8 %]</th>
14 14
    <th>[% IF FORM.sort_by == 'order_date' %]
15 15
      <a href ="controller.pl?action=ShopOrder/list&filter.transferred:eq_ignore_empty=[% FORM.filter.transferred_eq_ignore_empty %]&sort_by=order_date&sort_dir=[% 1 - FORM.sort_dir %]&filter.order_date:date::ge=[% FORM.filter.order_date_date__ge %]&filter.order_date:date::le=[% FORM.filter.order_date_date__le %]&filter.obsolete=[% FORM.filter.obsolete %]" class="sort_link">
16 16
        [% 'Shop orderdate' | $T8 %][% IF FORM.sort_dir == 0 %]<img border="0" src="image/down.png">[% ELSE %]<img border="0" src="image/up.png">[% END %]</a>
......
18 18
      <a href ="controller.pl?action=ShopOrder/list&filter.transferred:eq_ignore_empty=[% FORM.filter.transferred_eq_ignore_empty %]&sort_by=order_date&sort_dir=0&filter.order_date:date::ge=[% FORM.filter.order_date_date__ge %]&filter.order_date:date::le=[% FORM.filter.order_date_date__le %]&filter.obsolete=[% FORM.filter.obsolete %]" class="sort_link">
19 19
        [% 'Shop orderdate' | $T8 %]</a>
20 20
    [% END %]
21
    <br>
22
    [% IF FORM.sort_by == 'itime' %]
23
      <a href ="controller.pl?action=ShopOrder/list&filter.transferred:eq_ignore_empty=[% FORM.filter.transferred_eq_ignore_empty %]&sort_by=itime&sort_dir=[% 1 - FORM.sort_dir %]&filter.order_date:date::ge=[% FORM.filter.order_date_date__ge %]&filter.order_date:date::le=[% FORM.filter.order_date_date__le %]&filter.obsolete=[% FORM.filter.obsolete %]" class="sort_link">
24
        [% 'Importdate' | $T8 %][% IF FORM.sort_dir == 0 %]<img border="0" src="image/down.png">[% ELSE %]<img border="0" src="image/up.png">[% END %]</a>
25
    [% ELSE %]
26
      <a href ="controller.pl?action=ShopOrder/list&filter.transferred:eq_ignore_empty=[% FORM.filter.transferred_eq_ignore_empty %]&sort_by=itime&sort_dir=0&filter.order_date:date::ge=[% FORM.filter.order_date_date__ge %]&filter.order_date:date::le=[% FORM.filter.order_date_date__le %]&filter.obsolete=[% FORM.filter.obsolete %]" class="sort_link">
27
        [% 'Importdate' | $T8 %]</a>
28
    [% END %]
21 29
    </th>
22 30
    <th>[% IF FORM.sort_by == 'shop_ordernumber' %]
23 31
      <a href ="controller.pl?action=ShopOrder/list&filter.transferred:eq_ignore_empty=[% FORM.filter.transferred_eq_ignore_empty %]&sort_by=shop_ordernumber&sort_dir=[% 1 - FORM.sort_dir %]&filter.order_date:date::ge=[% FORM.filter.order_date_date__ge %]&filter.order_date:date::le=[% FORM.filter.order_date_date__le %]&filter.obsolete=[% FORM.filter.obsolete %]" class="sort_link">
......
141 149
  [% # Dumper.dump_html(shop_order) %]
142 150
    [% IF shop_order.kivi_customer.id && shop_order.kivi_customer.order_lock == 0 && shop_order.open_invoices == 0 %] [% SET transferable = 1 %] [% SET transferable_class = 'style="background:rgba(43, 208, 54, 0.5);"' %] [% ELSE %] [% SET transferable = 0 %] [% SET transferable_class = '' %][% END %]
143 151
  <tr class="listrow">
144
    <td>[% HTML.escape(shop_order.host) %]</td>
145
    <td>[% shop_order.order_date.dmy('.') _ ' ' _ shop_order.order_date.hms(':') %]</td>
152
    <td>[% HTML.escape(shop_order.shop.description) %]</td>
153
    <td>[% shop_order.order_date.dmy('.') _ ' ' _ shop_order.order_date.hms(':') %]<br>[% shop_order.order_date.dmy('.') _ ' ' _ shop_order.itime.hms(':') %]</td>
146 154
    <td>[% HTML.escape(shop_order.shop_ordernumber) %]</td>
147 155
    <td>[% HTML.escape(shop_order.shop_customer_number) %]</td>
148 156
    <td>[% IF shop_order.customer_company %]<b>[% HTML.escape(shop_order.customer_company) %]</b><br>[% END %]

Auch abrufbar als: Unified diff