Revision 297

Date:
2013/03/27 13:34:18
Author:
ahitrov
Revision Log:
Запрет на удаление
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/webshop/comps/contenido/webshop/index.html

     
    106 106 foreach my $object ( @objects ) {
    107 107 my $document_access = $user->section_accesses($user, $object->section);
    108 108 next unless $document_access == 2;
    109 $object->delete;
    109 if ( $user->type ) {
    110 $object->status( 5 );
    111 $object->store;
    112 } else {
    113 $object->delete;
    114 }
    110 115 }
    111 116 }
    112 117 $m->redirect("/contenido/webshop/".($return_params ? '?'.$return_params : ''));
  • utf8/plugins/webshop/lib/webshop/Order.pm

     
    28 28 { 'attr' => 'etime', 'type' => 'datetime', 'rusname' => 'Заказ доставлен',
    29 29 manager_hidden => 1, postedit => 1, facilshow => 1 },
    30 30 { 'attr' => 'num', 'type' => 'integer', 'rusname' => 'Количество позиций',
    31 manshow => 1, postshow => 1, facilshow => 1 },
    31 manager_hidden => 1, manshow => 1, postshow => 1, facilshow => 1 },
    32 32 { 'attr' => 'sum', 'type' => 'string', 'rusname' => 'Сумма (total)', shortname => 'Сумма',
    33 column => 5, postshow => 1, facilshow => 1 },
    33 manager_hidden => 1, column => 5, postshow => 1, facilshow => 1 },
    34 34 { 'attr' => 'sum_discount', 'type' => 'string', 'rusname' => 'Сумма скидки', shortname => 'Скидка',
    35 column => 6, postshow => 1, facilshow => 1 },
    35 manager_hidden => 1, column => 6, postshow => 1, facilshow => 1 },
    36 36 { 'attr' => 'sum_delivery', 'type' => 'string', 'rusname' => 'Стоимость доставки', shortname => 'Доставка',
    37 column => 7, postshow => 1, facilshow => 1 },
    37 manager_hidden => 1, column => 7, postshow => 1, facilshow => 1 },
    38 38 { 'attr' => 'sum_total', 'type' => 'string', 'rusname' => 'Сумма общая', shortname => 'Total',
    39 column => 8, virtual => 1, postshow => 1, facilshow => 1 },
    39 manager_hidden => 1, column => 8, virtual => 1, postshow => 1, facilshow => 1 },
    40 40 { 'attr' => 'contact', 'type' => 'string', 'rusname' => 'Контактное лицо', facilshow => 1 },
    41 41 { 'attr' => 'email', 'type' => 'string', 'rusname' => 'E-mail для связи', shortname => 'E-mail',
    42 42 column => 3, postshow => 1, facilshow => 1, mandatory => 1, },
    43 43 { 'attr' => 'phone', 'type' => 'string', 'rusname' => 'Телефон для связи', shortname => 'Тел.',
    44 44 column => 4, postshow => 1, facilshow => 1,
    45 45 mandatory => 1, rel => 'Не указан телефон' },
    46 { 'attr' => 'address', 'type' => 'text', 'rusname' => 'Адрес доставки', rows => 5, postedit => 1, facilshow => 1,
    46 47 { 'attr' => 'zipcode', 'type' => 'string', 'rusname' => 'Почтовый индекс', postshow => 1,
    47 48 mandatory => 1, rel => 'Не указан почтовый индекс' },
    48 49 { 'attr' => 'area', 'type' => 'lookup', 'rusname' => 'Регион',
     
    55 56 },
    56 57 { 'attr' => 'town', 'type' => 'string', 'rusname' => 'Город', postshow => 1, facilshow => 1,
    57 58 mandatory => 1, rel => 'Не указан город' },
    58 { 'attr' => 'metro', 'type' => 'string', 'rusname' => 'Ближайшее метро', postshow => 1 },
    59 { 'attr' => 'metro', 'type' => 'string', 'rusname' => 'Ближайшее метро', manager_hidden => 1, postshow => 1 },
    59 60 { 'attr' => 'timeline', 'type' => 'string', 'rusname' => 'Предпочтительное время', postshow => 1, },
    60 { 'attr' => 'description', 'type' => 'text', 'rusname' => 'Описание для курьера', rows => 5, postshow => 1 },
    61 { 'attr' => 'facility_comment', 'type' => 'text', 'rusname' => 'Описание проблем с комплектацией', rows => 5, faciledit => 1 },
    62 { 'attr' => 'delivery_comment', 'type' => 'text', 'rusname' => 'Описание проблем с доставкой', rows => 5, postedit => 1 },
    63 { 'attr' => 'address', 'type' => 'text', 'rusname' => 'Адрес доставки', rows => 5, postedit => 1, facilshow => 1,
    61 { 'attr' => 'description', 'type' => 'text', 'rusname' => 'Описание для курьера', rows => 5, manager_hidden => 1, postshow => 1 },
    62 { 'attr' => 'facility_comment', 'type' => 'text', 'rusname' => 'Описание проблем с комплектацией', rows => 5, manager_hidden => 1, faciledit => 1 },
    63 { 'attr' => 'delivery_comment', 'type' => 'text', 'rusname' => 'Описание проблем с доставкой', rows => 5, manager_hidden => 1, postedit => 1 },
    64 64 mandatory => 1, rel => 'Не заполнен адрес доставки' },
    65 65 )
    66 66 }
     
    95 95 sub reject {
    96 96 my $self = shift;
    97 97
    98 my $query = $self->{keeper}->SQL->prepare("delete from basket where order_id = ? and uid = ?");
    99 $query->execute( $self->id, $self->uid );
    100 $self->delete;
    98 # my $query = $self->{keeper}->SQL->prepare("delete from basket where order_id = ? and uid = ?");
    99 # $query->execute( $self->id, $self->uid );
    100 $self->status(5);
    101 $self->store;
    101 102 }
    102 103
    103 104