Revision 449

Date:
2014/11/13 13:06:19
Author:
ahitrov
Revision Log:
Sync datetime
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/webshop/lib/webshop/Keeper.pm

     
    154 154 return unless $opts{uid} || $opts{session} || $opts{order_id};
    155 155
    156 156 my $with_products = delete $opts{with_products} || 0;
    157 my $product_status = exists $opts{product_status} ? delete $opts{product_status} : 'positive';
    157 158 my $uid = delete $opts{uid};
    158 159 my $session_id = delete $opts{session};
    159 160 unless ( exists $opts{order_id} && $opts{order_id} ) {
     
    178 179 $items = @ids ? $keeper->get_documents (
    179 180 id => \@ids,
    180 181 class => $state->{webshop}->{item_document_class},
    181 status => 'positive',
    182 status => $product_status,
    182 183 return_mode => 'hash_ref',
    183 184 ) : {};
    184 185 }
  • utf8/plugins/webshop/lib/webshop/SQL/Order.pm

     
    30 30 _manager_filter
    31 31 _vault_filter
    32 32 _postman_filter
    33 _sync_filter
    33 34 )];
    34 35
    35 36 sub available_filters {
     
    190 191 'db_type' => 'integer',
    191 192 'default' => 0,
    192 193 },
    194 {
    195 'attr' => 'synctime',
    196 'type' => 'datetime',
    197 'rusname' => 'Время последней синхронизации',
    198 'postshow' => 1,
    199 'facilshow' => 1,
    200 'db_field' => 'synctime',
    201 'db_type' => 'timestamp',
    202 },
    193 203 );
    194 204
    195 205 # ----------------------------------------------------------------------------
     
    227 237 return &SQL::Common::_generic_int_filter('d.payment', $opts{payment});
    228 238 }
    229 239
    240 sub _sync_filter {
    241 my ($self,%opts)=@_;
    242 return undef unless ( exists $opts{sync} );
    243 return &SQL::Common::_generic_int_filter('d.syncro', $opts{sync});
    244 }
    245
    230 246 sub _uid_filter {
    231 247 my ($self,%opts)=@_;
    232 248 return undef unless ( exists $opts{uid} );
  • utf8/plugins/webshop/sql/TOAST/orders.sql

     
    7 7 status smallint default 0 NOT NULL,
    8 8 payment smallint default 0,
    9 9 syncro smallint default 0,
    10 synctime timestamp without time zone,
    10 11 sections integer[],
    11 12 uid integer,
    12 13 company_id integer,
  • utf8/plugins/webshop/sql/TOAST/orders.update.448.sql

     
    1 alter table orders add column synctime timestamp without time zone;