Revision 545

Date:
2016/01/27 12:39:21
Author:
ahitrov
Revision Log:
Additional order statuses

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/webshop/comps/contenido/webshop/components/block_order_status_changer.msn

     
    3 3
    4 4 <table width="100%" border="0" cellpadding="3" cellspacing="0" class="tlistdocs">
    5 5 <tr bgcolor="#efefef">
    6 <th align="center" width="1%">ID</th>
    7 <th>Статус</th>
    6 <th align="center" width="1%">ID</th>
    7 <th>Основной статус</th>
    8 </tr>
    8 9
    9 10 % foreach my $case ( @cases ) {
    10 % next unless $case->[0];
    11 % next if !$case->[0] || $case->[0] > 5;
    11 12 % my $style = $status && $case->[0] == $status ? 'inverted' : '';
    12 <tr class="<% $style %>">
    13 <td><% $case->[0] %></td>
    14 <td><table cellpadding="0" cellspacing="0" border="0">
    15 <tr valign="top">
    16 <td width="10">&nbsp;</td>
    17 <td><a href="./?ost=<% $case->[0] %>"><% Encode::encode('utf-8', ucfirst(Encode::decode('utf-8',$case->[1]))) %></a></td>
    18 </tr>
    19 </table>
    20 </td>
    21 </tr>
    13 <tr class="<% $style %>">
    14 <td><% $case->[0] %></td>
    15 <td><table cellpadding="0" cellspacing="0" border="0">
    16 <tr valign="top">
    17 <td width="10">&nbsp;</td>
    18 <td><a href="./?ost=<% $case->[0] %>"><% Encode::encode('utf-8', ucfirst(Encode::decode('utf-8',$case->[1]))) %></a></td>
    19 </tr>
    20 </table>
    21 </td>
    22 </tr>
    23
    24
    22 25 % }
    26 <tr bgcolor="#efefef">
    27 <th align="center" width="1%">ID</th>
    28 <th>Дополнительный статус</th>
    29 </tr>
    30 % foreach my $case ( @cases ) {
    31 % next if $case->[0] < 6;
    32 % my $style = $status && $case->[0] == $status ? 'inverted' : '';
    33 <tr class="<% $style %>">
    34 <td><% $case->[0] %></td>
    35 <td><table cellpadding="0" cellspacing="0" border="0">
    36 <tr valign="top">
    37 <td width="10">&nbsp;</td>
    38 <td><a href="./?ost=<% $case->[0] %>"><% Encode::encode('utf-8', ucfirst(Encode::decode('utf-8',$case->[1]))) %></a></td>
    39 </tr>
    40 </table>
    41 </td>
    42 </tr>
    23 43
    44
    45 % }
    46
    24 47 </table>
    25 48
    26 49 </fieldset>
  • utf8/plugins/webshop/comps/contenido/webshop/components/order_browse.msn

     
    231 231
    232 232 my %users;
    233 233 my ($href, @actions, $user_id);
    234 if ( $status == 1 && (!$active_rights || $active_rights == 1) ) {
    234 if ( ($status == 1 || $status == 6 || $status == 7 || $status == 8) && (!$active_rights || $active_rights == 1) ) {
    235 235 $href = 'take_care.html';
    236 236 @actions = { href => $href, name => 'обработать' };
    237 237 $user_id = 'manager_id';
  • utf8/plugins/webshop/comps/contenido/webshop/components/order_form.msn

     
    35 35 <input type="submit" name="_save_and_complect" value="На комплектацию" class="input_btn">
    36 36 <input type="submit" name="_save_and_deliver" value="Сразу в доставку" class="input_btn">
    37 37 % }
    38 <hr>
    39 <input type="submit" name="_save_status_6" value="Ожидание оплаты" class="input_btn">
    40 <input type="submit" name="_save_status_7" value="Товар в резерве" class="input_btn">
    41 <input type="submit" name="_save_status_8" value="Не дозвонились" class="input_btn">
    38 42
    39 43 <input type="hidden" name="control_charset" value="Контроль">
    40 44 % if ( ref $filter_params eq 'HASH' ) {
  • utf8/plugins/webshop/comps/contenido/webshop/delivery.html

     
    193 193 $document->status(1);
    194 194 } elsif ( $ARGS{_ret_facility} ) {
    195 195 $document->status(2);
    196 } elsif ( $ARGS{_save_status_6} || $ARGS{_save_status_7} || $ARGS{_save_status_8} ) {
    197 $document->status($ARGS{_save_status_6} ? 6 : $ARGS{_save_status_7} ? 7 : 8);
    196 198 } elsif ( $ARGS{_save_and_leave} ) {
    197 199 }
    198 200
     
    207 209 $m->redirect("./?ost=3");
    208 210 } elsif ($ARGS{_ret_facility}) {
    209 211 $m->redirect("./?ost=3");
    210 } elsif ($ARGS{_save_and_leave}) {
    211 $m->redirect("./?ost=1".($return_params ? '&'.$return_params : ''));
    212 } elsif ($ARGS{_save_and_leave} || $ARGS{_save_status_6} || $ARGS{_save_status_7} || $ARGS{_save_status_8}) {
    213 my $st = $ARGS{_save_status_6} ? 6 : $ARGS{_save_status_7} ? 7 : $ARGS{_save_status_8} ? 8 : 3;
    214 $m->redirect("./?ost=".$st.($return_params ? '&'.$return_params : ''));
    212 215 }
    213 216
    214 217 $m->redirect("delivery.html?id=".$document->id.($return_params ? '&'.$return_params : ''));
  • utf8/plugins/webshop/comps/contenido/webshop/facility.html

     
    169 169 $document->status(1);
    170 170 } elsif ( $ARGS{_save_and_leave} ) {
    171 171 $document->vault_id( undef );
    172 $document->status(1);
    172 } elsif ( $ARGS{_save_status_6} || $ARGS{_save_status_7} || $ARGS{_save_status_8} ) {
    173 $document->vault_id( undef );
    174 $document->status($ARGS{_save_status_6} ? 6 : $ARGS{_save_status_7} ? 7 : 8);
    173 175 }
    174 176
    175 177 unless ($document->store()) {
     
    183 185 $m->redirect("./?ost=2");
    184 186 } elsif ($ARGS{_save_and_leave}) {
    185 187 $m->redirect("./?ost=2");
    186 } elsif ($ARGS{_save_and_leave}) {
    187 $m->redirect("./?ost=1".($return_params ? '&'.$return_params : ''));
    188 } elsif ($ARGS{_save_and_leave} || $ARGS{_save_status_6} || $ARGS{_save_status_7} || $ARGS{_save_status_8}) {
    189 my $st = $ARGS{_save_status_6} ? 6 : $ARGS{_save_status_7} ? 7 : $ARGS{_save_status_8} ? 8 : 2;
    190 $m->redirect("./?ost=".$st.($return_params ? '&'.$return_params : ''));
    188 191 }
    189 192
    190 193 $m->redirect("take_care.html?id=".$document->id.($return_params ? '&'.$return_params : ''));
  • utf8/plugins/webshop/comps/contenido/webshop/take_care.html

     
    166 166 $document->status(2);
    167 167 } elsif ( $ARGS{_save_and_leave} ) {
    168 168 $document->manager_id( undef );
    169 $document->status(1);
    169 } elsif ( $ARGS{_save_status_6} || $ARGS{_save_status_7} || $ARGS{_save_status_8} ) {
    170 $document->manager_id( undef );
    171 $document->status($ARGS{_save_status_6} ? 6 : $ARGS{_save_status_7} ? 7 : 8);
    170 172 }
    171 173
    172 174 unless ($document->store()) {
     
    178 180 $m->redirect("./?ost=2");
    179 181 } elsif ($ARGS{_save_and_deliver}) {
    180 182 $m->redirect("./?ost=3");
    181 } elsif ($ARGS{_save_and_leave}) {
    182 $m->redirect("./?ost=1".($return_params ? '&'.$return_params : ''));
    183 } elsif ($ARGS{_save_and_leave} || $ARGS{_save_status_6} || $ARGS{_save_status_7} || $ARGS{_save_status_8}) {
    184 $m->redirect("./?ost=".$document->status.($return_params ? '&'.$return_params : ''));
    183 185 }
    184 186
    185 187 $m->redirect("take_care.html?id=".$document->id.($return_params ? '&'.$return_params : ''));
  • utf8/plugins/webshop/lib/webshop/Order.pm

     
    15 15 [3, 'в доставке'],
    16 16 [4, 'доставлен'],
    17 17 [5, 'отклонен'],
    18 [6, 'ожидание оплаты'],
    19 [7, 'товар в резерве'],
    20 [8, 'не дозвонились'],
    18 21 ],
    19 22 },
    20 23 { 'attr' => 'delivery', 'type' => 'lookup', 'rusname' => 'Тип доставки', facilshow => 1, postshow => 1,