Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 46aad91f

Von Werner Hahn vor etwa 7 Jahren hinzugefügt

  • ID 46aad91fe3ae6fb161cbe98edac2fc7dee7d2acd
  • Vorgänger 7df422c9
  • Nachfolger 7f776d77

Shopmodul: itime und Vorgangsbezeichnung in TBL shops
Vorgangsbezeichnung kann jetzt für jeden Shop bestimmt werden und wird
bei transfer_to_sales_order verwendet

Unterschiede anzeigen:

SL/DB/MetaSetup/Shop.pm
9 9
__PACKAGE__->meta->table('shops');
10 10

  
11 11
__PACKAGE__->meta->columns(
12
  connector         => { type => 'text' },
13
  description       => { type => 'text' },
14
  id                => { type => 'serial', not_null => 1 },
15
  last_order_number => { type => 'integer' },
16
  login             => { type => 'text' },
17
  obsolete          => { type => 'boolean', default => 'false', not_null => 1 },
18
  orders_to_fetch   => { type => 'integer' },
19
  password          => { type => 'text' },
20
  path              => { type => 'text', default => '/', not_null => 1 },
21
  port              => { type => 'integer' },
22
  price_source      => { type => 'text' },
23
  pricetype         => { type => 'text' },
24
  protocol          => { type => 'text', default => 'http', not_null => 1 },
25
  realm             => { type => 'text' },
26
  server            => { type => 'text' },
27
  sortkey           => { type => 'integer' },
28
  taxzone_id        => { type => 'integer' },
12
  connector               => { type => 'text' },
13
  description             => { type => 'text' },
14
  id                      => { type => 'serial', not_null => 1 },
15
  itime                   => { type => 'timestamp', default => 'now()' },
16
  last_order_number       => { type => 'integer' },
17
  login                   => { type => 'text' },
18
  obsolete                => { type => 'boolean', default => 'false', not_null => 1 },
19
  orders_to_fetch         => { type => 'integer' },
20
  password                => { type => 'text' },
21
  path                    => { type => 'text', default => '/', not_null => 1 },
22
  port                    => { type => 'integer' },
23
  price_source            => { type => 'text' },
24
  pricetype               => { type => 'text' },
25
  protocol                => { type => 'text', default => 'http', not_null => 1 },
26
  realm                   => { type => 'text' },
27
  server                  => { type => 'text' },
28
  sortkey                 => { type => 'integer' },
29
  taxzone_id              => { type => 'integer' },
30
  transaction_description => { type => 'text' },
29 31
);
30 32

  
31 33
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
32 34

  
35
__PACKAGE__->meta->allow_inline_column_values(1);
36

  
33 37
1;
34 38
;
SL/DB/ShopOrder.pm
83 83
      }
84 84
    }
85 85

  
86
    my $shop = SL::DB::Manager::Shop->find_by(id => $self->shop_id);
86 87
    my $order = SL::DB::Order->new(
87 88
      amount                  => $self->amount,
88 89
      cusordnumber            => $self->shop_ordernumber,
......
96 97
      payment_id              => $customer->payment_id,
97 98
      taxzone_id              => $customer->taxzone_id,
98 99
      currency_id             => $customer->currency_id,
99
      transaction_description => 'Shop Import',
100
      transaction_description => $shop->transaction_description,
100 101
      transdate               => DateTime->today_local
101 102
    );
102 103
     return $order;
sql/Pg-upgrade2/shops_3.sql
1
-- @tag: shop_3
2
-- @description: Add columns itime and transaction_description for table shops
3
-- @charset: UTF-8
4
-- @depends: shops
5
-- @ignore: 0
6

  
7
ALTER TABLE shops ADD COLUMN transaction_description TEXT;
8
ALTER TABLE shops ADD COLUMN itime timestamp DEFAULT now();
templates/webpages/shops/form.html
69 69
    <th align="right">[% 'Orders to fetch' | $T8 %]</th>
70 70
    <td>[%- L.input_tag("shop.orders_to_fetch", SELF.shop.orders_to_fetch, size=12) %]</td>
71 71
  </tr>
72
  <tr>
73
    <th align="right">[% 'Transaction description' | $T8 %]</th>
74
    <td>[%- L.input_tag("shop.transaction_description", SELF.shop.transaction_description, size=size) %]</td>
75
  </tr>
72 76
  <tr>
73 77
    <th align="right">[% 'Obsolete' | $T8 %]</th>
74 78
    <td>[% L.checkbox_tag('shop.obsolete', checked = SELF.shop.obsolete, for_submit=1) %]</td>
templates/webpages/shops/list.html
9 9
    <th align="center" width="1%"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
10 10
    <th>[% 'Description' | $T8 %]</th>
11 11
    <th>[% 'Type' | $T8 %]</th>
12
    <th>[% 'Obsolete' | $T8 %]</th>
12 13
   </tr>
13 14
  </thead>
14 15

  
......
18 19
     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
19 20
     <td><a href="[% SELF.url_for(action='edit', id=shop.id) %]">[% HTML.escape(shop.description) %]</a></td>
20 21
     <td>[% HTML.escape(shop.connector) %]</a></td>
22
     <td>[% HTML.escape(shop.obsolete) %]</td>
21 23
    </tr>
22 24
   [%- END %]
23 25
  </tbody>

Auch abrufbar als: Unified diff