AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.217.80
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/www/lrsys_apps/hering/ui/theme/lrsys/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/www/lrsys_apps/hering/ui/theme/lrsys/orders_edit.tpl
{include file="sections/header.tpl"}
{if not empty($d['sys_invoice_id'])}
    <div class="bs-callout bs-callout-warning bs-callout-compact hide-from-edit" id="mensagemEdicaoDesabilitada" style="">
        <h4>{$_L['Edit disabled']}</h4><p>{$_L['You can not edit sales orders that have posted accounts.']}</p>
            <br/>
            <a  href="#" class="first show-on-view hide-from-view">
                <i class="fa fa-fw fa-undo"></i> {$_L['Reverse accounts to edit']}</a></p>
    </div>
{else}
    <input type="hidden" id="updateDataAmountDivided" value="0">
<div class="wrapper wrapper-content" id='topo_erp'>
    <div class="row">
        <div class="col-md-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{$_L['Orders Edit']}</h5>
                </div>
                <div class="ibox-content" id="ibox_form"> 
                    <div class="alert alert-danger" id="emsg">
                        <span id="emsgbody"></span>
                    </div>

                    <form class="form-horizontal" id="ib_form">
                        <input type="hidden" id="id" name="id" value="{$d['id']}">
                        <div class="row">    
                            <div class="col-md-6 col-sm-12 col-xs-12">
                                <label>{$_L['DELIVERY_TYPE']}</label>
                                <select id="delivery_type" name="delivery_type" class="form-control">
                                    <option value="All">{$_L['DELIVERY_TYPE_SELECT']}</option>
                                    <option value="Delivery">{$_L['DELIVERY_TYPE_DELIVERY']}</option>
                                    <option value="Withdrawal">{$_L['DELIVERY_TYPE_PICKUP']}</option>
                                </select>
                            </div>
                        </div>
                        
                        <div class="col-xs-12 div_form">  <h2> {$_L['Sales Order']}</h2> </div>
                        <div class="row"  style="margin-top:20px">
                            <div class="col-md-8 col-sm-12 col-xs-12">
                                <label class="control-label" >{$_L['Nature Of Operation']}</label>
                                <select  name="nature_operation" id="nature_operation" class="form-control select2"></select>
                                <span class="help-block"><a href="#" id="add_new_nature">{$_L['Add New Nature Of Operation']}</a> </span>
                            </div>
                            <div class="col-md-4 col-sm-12 col-xs-12">
                                <label class="control-label" >{$_L['Number']}</label>
                                <input disabled="disabled" value='{$d['id']}' class="form-control">
                                <span class="help-block">{$_L['Order Number']} </span>
                            </div>
                            <div class="col-md-6 col-sm-12 col-xs-12">
                                <label class="control-label" >{$_L['Customer'] }</label>
                                <select name="client" id="client" class="form-control select2"></select>
                                <span class="help-block"><a href="#" id="contact_add">| {$_L['Or Add New Customer']}</a> </span>
<input type="hidden" id="selectedContact" value="{$d['crm_accounts_id']}">
<input type="hidden" id="selectedSalesman" value="{$d['salesman_id']}">


                                <div class="delivery-type-delivery">
                                    <label class="control-label">{$_L['Delivery address']}</label><br/>
                                    <span id="type_address" class="hide">  <input type="radio" name='delivery_address'  class='exchange_address' checked="" value='tax_address' id="type_address_1"/> <label class="control-label" for="type_address_1">{$_L['Address']}</label>  
                                                <input name='delivery_address' class='exchange_address type_address_billing' value='billing_address' id="type_address_billing" type="radio"> <label class="control-label type_address_billing" for="type_address_billing">{$_L['Billing address']}</label> 
                                                <input name='delivery_address' class='exchange_address' value='other' type="radio" id="type_address_3" /> <label class="control-label" for="type_address_3">{$_L['Other']}</label></span>

                                    <textarea id="ta_address" readonly class="form-control" rows="5"></textarea>                     
                                    <span id="spam-edit-client" class="hide help-block"><a href="#" id="contact_edit" data-id="">| {$_L['Client without address, click here to update the address']}</a> </span>

                                    <div class="row" id="div_zip">

                                        <div class="col-md-3 col-sm-12 col-xs-12">
                                           <label class="control-label" for="zip">{$_L['ZIP Postal Code']} </label>
                                                <input type="text" id="zip" name="zip" class="cep form-control">
                                        </div>


                                        <div class="col-md-4 col-sm-12 col-xs-12">
                                           <label class="control-label" for="state">{$_L['State Region']}</label>
                                           <select name="state" id="state" class="form-control select2" style="width:100%">
                                               <option value="">{$_L['Select State']}</option>
                                                    {foreach $state as $s}
                                                        <option value="{$s['id']}">{$s['state_name']}</option>
                                                    {/foreach}
                                           </select>
                                        </div>                 

                                        <div class="col-md-5 col-sm-12 col-xs-12">
                                           <label class=" control-label" id="label_cidade" for="city">{$_L['City']}</label>
                                           <select name="city" id="city" class="form-control select2" style="width:100%">
                                           </select>
                                        </div>   


                                        <div class="col-md-12 col-sm-12 col-xs-12">
                                            <label class="control-label" for="address">{$_L['Address']}</label>
                                           <input type="text" id="address" name="address" class="form-control" maxlength="100"/>
                                        </div>
                                        <div class="col-md-4 col-sm-12 col-xs-12">
                                            <label class="control-label">{$_L['Neighborhood']}</label>
                                            <input type="text" id="neighborhood" name="neighborhood" class="form-control" maxlength="100"/>
                                        </div>

                                        <div class="col-md-2 col-sm-12 col-xs-12">
                                            <label class="control-label">{$_L['Number']}</label>
                                            <input type="text" id="number" name="number" class="form-control" maxlength="100"/>
                                        </div> 

                                        <div class="col-md-6 col-sm-12 col-xs-12">
                                            <label class="control-label" >{$_L['Complement']}</label>
                                            <input type="text" id="complement" name="complement" class="form-control" maxlength="100"/>
                                        </div> 

                                    </div>
                                </div>
                            </div>

                            <div class="col-md-6 col-sm-12 col-xs-12">
                                <label class="control-label" >{$_L['Salesman']}</label>
                                <select name="salesman" id="salesman" class="form-control select2"></select>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-xs-12 div_form">  <h2> {$_L['Products n Services']}</h2> </div>
                            <div class="table-responsive m-t">
                                <table class="table invoice-table" id="invoice_items">
                                    <thead>
                                    <tr>
                                        <th class="col-md-1 col-sm-12 col-xs-12">{$_L['Item Code']}</th>
{*                                        <th class="col-md-1 col-sm-12 col-xs-12">{$_L['Image']}</th>*}
                                        <th class="col-md-3 col-sm-12 col-xs-12">{$_L['Item Name']}</th>
                                        <th class="col-md-1 col-sm-12 col-xs-12">{$_L['Qty']}</th>
                                        <th class="col-md-2 col-sm-12 col-xs-12">{$_L['Price']}</th>
                                        <th class="col-md-1 col-sm-12 col-xs-12">{$_L['Discount']}</th>
                                        <th class="col-md-2 col-sm-12 col-xs-12">{$_L['Total']}</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {foreach $items as $item}
                                        {$id = $item['sys_item_id']}
                                        
                                          {foreach $itensUnit as $itn}
                                            {if $itn['id'] == $id}
                                                {foreach $undades as $und}
                                                    {if $und['id'] == $itn['unit_id']}
                                                        {$unid = $und['initials']}
                                                        {$valInt = $und['int_value']}
                                                    {/if}
                                                {/foreach}
                                            {/if}
                                          {/foreach}
                                      

                                       
                                       
                       <tr class="itm_nm_ftura ">
                           <td class="middle">
                               <span id="product_code{$row}">{$item['sys_item_id']}</span>
                           </td>
                            <td class="middle">
                                  <input type="hidden" class="product" id="product_{$row}" name="product[]" data-product-id="{$item['sys_item_id']}">
                                <input type="hidden" class="id_product" id="id_product_{$row}" data-row="{$row}" name="id_product[]" value="{$item['sys_item_id']}">
                                <input type="text" class="form-control" readonly  id="i_{$row}" value="{$item['description']}" name="desc[]">
                                <input type="hidden" class="form-control" readonly  id="select_product_{$row}" value="{$row}">
                            <span class="text-red hide" id="msg_stock_{$row}"></spam>
                            </td>
                            <td class="middle">
                                <input class="itm_nm_ftura" type="hidden"  id="unit_itm{$row}">
                                <input type="text" data-net-weight="0.00" data-gross-weight="0.00" readonly class="form-control qtyl qtyVal{$row}"  data-id="{$item['sys_item_id']}"   value="{$item['qty']}" name="qty[]" id="{$row}">
                           </td>
                           <td class="middle">
                                <input type="text" id="item_price{$row}" value="{number_format($item['amount'],2,$_c['dec_point'],$_c['thousands_sep'])}"   class="form-control item_price{$row} am" name="amount[]"  readonly>
                           </td>
                            <td class="middle">
                                <input type="text" id="item_discount{$row}"  value="{number_format($item['discount'],2,$_c['dec_point'],$_c['thousands_sep'])}" class="form-control item_discount item_discount{$row} am"   name="item_discount[]">
                            </td> 
                            <td class="ltotal middle">
                                <input type="text" value="{{number_format($item['total'],2,$_c['dec_point'],$_c['thousands_sep'])}}"  id="lvtotal{$row}" class="form-control lvtotal lvtotal{$row} am" readonly >
                            </td>  
                            <td class="middle col-xs-1">   
                                <span class="btn btn-success btn-xs ok_product hide" id="ok_product{$row}" data-row="{$row}" ><i class="fa fa-check"></i> </span>   <span class="btn btn-success btn-xs edit_product" id="edit_product{$row}"  data-row="{$row}" ><i class="fa fa-edit"></i> </span> 
                                <span class="btn btn-danger btn-xs delete_product" data-row="{$row++}" ><i class="fa fa-trash"></i> </span></td></tr>
                  
                                       
                                       
                                        
                                    {/foreach}

                                    </tbody>
                                </table>
<input type="hidden" id="row" value="{$row}">
                            </div>
                            <button type="button" class="btn btn-primary" id="item-add"><i class="fa fa-search"></i> {$_L['Add Product OR Service']}
                            </button>
                         <!--   <button type="button" class="btn btn-danger" id="item-remove"><i class="fa fa-minus-circle"></i>
                                {$_L['Delete']}
                            </button> -->
                        </div>
                       
                        
                            <div class="col-xs-12 div_form">  <h2> {$_L['Totals']}</h2> </div>
                            <div class='row'  style="margin-top:20px">
                               
                                <div class="col-md-3 col-sm-4 col-xs-6">
                                        <label class="control-label" >{$_L['Number of Itens']}</label>
                                        <input disabled="disabled" id='number_itens' value='{$numberItens}' class="form-control">
                                </div>
                                
                                <div class="col-md-3 col-sm-4 col-xs-6">
                                        <label class="control-label" >{$_L['Sum of the qtdes']}</label>
                                        <input disabled="disabled" id='qtd_itens' value='{$qtdItens}' class="form-control">
                                </div>
                               
                                <div class=" col-md-3 col-sm-4 col-xs-12">
                                     <label class="control-label" >{$_L['Net weight']}</label>
                                     <div class="input-group">
                                         <input value='{$d['net_weight']}' type="text" id="net_weight" name="net_weight" class="form-control amount" autocomplete="off" data-v-min="0"  data-v-max="9999999999.999"  data-a-dec="{$_c['dec_point']}"  data-a-sep="{$_c['thousands_sep']}" data-d-group="3">
                                         <span class="input-group-addon  after">Kg</span>
                                     </div>
                                 </div>
                                 <div class=" col-md-3 col-sm-4 col-xs-12">
                                     <label class="control-label">{$_L['Gross weight']}</label>
                                     <div class="input-group">
                                         <input value='{$d['gross_weight']}' type="text" id="gross_weight" name="gross_weight" class="form-control amount" autocomplete="off" data-v-min="0"  data-v-max="9999999999.999"  data-a-dec="{$_c['dec_point']}" data-a-sep="{$_c['thousands_sep']}" data-d-group="3">
                                         <span class="input-group-addon  after">Kg</span>
                                     </div>
                                 </div>

                                 <div class=" col-md-3 col-sm-4 col-xs-12">
                                     <label class="control-label">{$_L['Total Product']}</label>                                   
                                     <input disabled="disabled" data-value="{$totalProduct}" value='{$totalProduct}' type="text" id="total_product" name="total_product" class="form-control amount am" autocomplete="off" data-a-sign="{$_c['currency_code']} "  data-a-dec="{$_c['dec_point']}" data-a-sep="{$_c['thousands_sep']}" data-d-group="2">
                                 </div>
                                 <div class=" col-md-3 col-sm-4 col-xs-12">
                                     <label class="control-label">{$_L['IPI Value']}</label>                                   
                                     <input disabled="disabled" value='{$ipi}' type="text" id="ipi" name="ipi" class="form-control amount am" autocomplete="off" data-a-sign="{$_c['currency_code']} "  data-a-dec="{$_c['dec_point']}" data-a-sep="{$_c['thousands_sep']}" data-d-group="2">
                                 </div>
                                 <div class=" col-md-3 col-sm-4 col-xs-12">
                                     <label class="control-label">{$_L['ICMS ST Value']}</label>                                   
                                     <input disabled="disabled" value='{$icmsst}' type="text" id="icms" name="icms" class="form-control amount am" autocomplete="off" data-a-sign="{$_c['currency_code']} "  data-a-dec="{$_c['dec_point']}" data-a-sep="{$_c['thousands_sep']}" data-d-group="2">
                                 </div>
                                 <div class=" col-md-3 col-sm-4 col-xs-12">
                                     <label class="control-label">{$_L['Total']}</label>                                   
                                     <input disabled="disabled" data-value="{$total}" value='{$total}' type="text" id="total" name="total" class="form-control amount am" autocomplete="off" data-a-sign="{$_c['currency_code']} "  data-a-dec="{$_c['dec_point']}" data-a-sep="{$_c['thousands_sep']}" data-d-group="2">
                                 </div>
                            </div>
                           
               
                            <div class="col-xs-12 div_form">  <h2> {$_L['Sale Details']}</h2> </div>
                                <div class='row'  style="margin-top:20px">

                                     <div class="col-md-3 col-sm-4 col-xs-6">
                                         <label class="control-label" >{$_L['Sales Data']}</label>
                                         <input type="text" class="form-control" id="sales_date" name="sales_date" datepicker
                                             data-date-format="{$_c['formatDate']}" data-auto-close="true"
                                             value="{date( $_c['df'], strtotime($d['sales_date']))}">
                                     </div>
                                    <div class="col-md-3 col-sm-4 col-xs-6">
                                         <label class="control-label" >{$_L['Expected date']}</label>
                                         <input type="text" class="form-control" id="expected_date" name="expected_date" datepicker
                                             data-date-format="{$_c['formatDate']}" data-auto-close="true" value="{date( $_c['df'], strtotime($d['expected_date']))}" 
                                         >
                                     </div>
                                       <!--  
                                    <div class=" col-md-3 col-sm-4 col-xs-12">
                                        <label class="control-label">{$_L['Payment Terms']}</label>
                                          <input type="text" class="form-control" id="duedate" name="duedate" datepicker
                                             data-date-format="{$_c['formatDate']}" data-auto-close="true" value="{date( $_c['df'], strtotime($d['duedate']))}"
                                         >
                                     </div> -->
                                  
                                     <div class=" col-md-3 col-sm-4 col-xs-12">
                                         <label class="control-label">{$_L['Discount']} </label> 
                                             <input type="radio" name='type_discount'  class='exchange_type_discount ' {if $d['discount_type']=='f'} checked="checked"{/if} value='f' id='dicount_f' /> <label class="control-label" for='dicount_f'> {$_c['currency_code']}</label> 
                                             <input name='type_discount' class='exchange_type_discount' {if $d['discount_type']=='p'} checked="checked"{/if} value='p' type="radio" id='dicount_p'/><label class="control-label" for='dicount_p'> % </label>                                  
                                         <div class="input-group">
                                             <input value='{$d['discount']}' type="text" id="discount" name="discount" class="form-control amount am updateTotais" autocomplete="off"   data-a-dec="{$_c['dec_point']}" data-a-sep="{$_c['thousands_sep']}" data-d-group="2">
                                             <span class="input-group-addon  after" id="span_type_disc">{$_c['currency_code']}</span>
                                         </div>
                                     </div>
                                         

                                     {*<div class=" col-md-4 col-sm-4 col-xs-12">
                                         <label class="control-label">{$_L['Purchase Order']}</label>                                   
                                         <input  value='{$d['purchase_order']}' type="text" maxlength="45" id="purchase_order" name="purchase_order" class="form-control" >
                                         <span class="help-block">{$_L['OC or order number in e-commerce']}</span>

                                     </div>*}
                                </div>
                                
                                <div class="col-xs-12 div_form">  <h2>  {$_L['Payment']} </h2> </div>
                                <div class="row">                                     
                                   <div class=" col-md-4 col-sm-4 col-xs-12">
                                        <label>{$_L['Payment Method Invoice']}</label>
                                        <div class="input-group">
                                            <select id="mtdopgto" name="mtdopgto" class="form-control" >
                                                    <option {if $d['payment_method']==0}selected{/if} value="0">{$_L['None']}</option>
                                                                                {foreach $payment_methods as $pmethod}
                                                    <option {if $d['payment_method']==$pmethod['id']}selected{/if} value="{$pmethod['id']}">{$pmethod['name']}</option>
                                                                                {/foreach}
                                                    <option {if $d['payment_method']==-1}selected{/if} value="-1">{$_L['Multiply']}</option>

                                            </select>
                                            <span class="input-group-addon  {if !($d['paymentcondition']==1 && $d['payment_method']==2)}hide {/if} after " style="border:none">
                                                <a href="#" class=""  id="icon_cheque"><i class="fa  fa-list-alt edit_check_data"></i></a>
                                            </span>
                                        </div>
                                        {if $d['paymentcondition']==1 && $d['payment_method']==2 &&
                                         not empty($divided[0]["params"])}
                                                       <input type="hidden" name="check_name"  id="check_name" value='{$divided[0]["param_value"]->check_name}'>
                                                       <input type="hidden" name="check_kind_of_person" id="check_kind_of_person" value='{$divided[0]["param_value"]->check_kind_of_person}'>
                                                       <input type="hidden" name="check_cpf_cnpj" id="check_cpf_cnpj" value='{$divided[0]["param_value"]->check_doc}'>
                                                       <input type="hidden" name="check_code1"  id="check_code1" value='{$divided[0]["param_value"]->check_code->b1}'>
                                                        <input type="hidden" name="check_code2"  id="check_code2" value='{$divided[0]["param_value"]->check_code->b2}'>
                                                       <input type="hidden" name="check_code3"  id="check_code3" value='{$divided[0]["param_value"]->check_code->b3}'>
                                                      
                                                       <input type="hidden" name="check_edited" id="check_edited" value="1">
                                                      
                                                       
                                        {else}
                                        <input type="hidden" name="check_name" id="check_name">
                                        <input type="hidden" name="check_kind_of_person" id="check_kind_of_person">
                                        <input type="hidden" name="check_cpf_cnpj" id="check_cpf_cnpj">
                                        <input type="hidden" name="check_code1" id="check_code1">
                                        <input type="hidden" name="check_code2" id="check_code2">
                                        <input type="hidden" name="check_code3" id="check_code3">
                                        <input type="hidden" name="check_edited" id="check_edited" value="0">
                                        {/if}
                                    </div>
                                    
                                        
                                    <div class=" col-md-4 col-sm-4 col-xs-12">
                                        <label for="cdtpgto">{$_L['Payment Condition Invoice']}</label>
                                        <select id="cdtpgto" name="cdtpgto" class="form-control" {if $d['payment_method']==-1}disabled{/if}>
                                          <!--  <option  {if $d['paymentcondition']==0}selected{/if} value="0">{$_L['None']}</option> -->
                                            <option  {if $d['paymentcondition']==1}selected{/if} value="1" selected="">{$_L['Payment Condition Invoice0']}</option>
                                            <option {if $d['paymentcondition']==2}selected{/if} value="2">{$_L['Payment Condition Invoice1']}</option>
                                            <option  {if $d['paymentcondition']==3}selected{/if} value="3">{$_L['Payment Condition Invoice2']}</option>
                                        </select>
                                    </div>
                                    <div class="div_divided col-md-3 col-sm-3 col-xs-9 {if $d['paymentcondition']!=3}hide{/if}">
                                        <label >&nbsp;</label>
                                        <div class="input-group">
                                            <input type="text" id="divided_condition" value="{$d["divided_condition"]}" name="divided_condition" class="form-control" maxlength="45"/>
                                            <span class="input-group-addon  after dropdown-toggle" data-toggle="dropdown">
                                                <i class="caret"></i>
                                            </span>
                                            <ul class="dropdown-menu pull-right" >
                                                 <!--   <li><a href="#" data-value="1x" class="divided">{$_L['Divided in']} 1x</a></li> -->
                                                    <li><a href="#" data-value="2x" class="divided" style="">  {$_L['Divided in']}  2x</a></li>
                                                    <li><a href="#" data-value="3x" class="divided" style="">{$_L['Divided in']}  3x</a></li>
                                                    <li><a href="#" data-value="4x" class="divided" style="">{$_L['Divided in']} 4x</a></li>
                                                    <li><a href="#" data-value="5x" class="divided" style="">{$_L['Divided in']}  5x</a></li>
                                                    <li><a href="#" data-value="6x" class="divided" style="">{$_L['Divided in']}  6x</a></li>
                                                    <li><a href="#" data-value="7x" class="divided" style="">{$_L['Divided in']}  7x</a></li>
                                                    <li><a href="#" data-value="8x" class="divided" style="">{$_L['Divided in']}  8x</a></li>
                                                    <li><a href="#" data-value="9x" class="divided" style="">{$_L['Divided in']}  9x</a></li>
                                                    <li><a href="#" data-value="10x" class="divided" style="">{$_L['Divided in']}  10x</a></li>
                                                    <li><a href="#" data-value="11x" class="divided" style="">{$_L['Divided in']}  11x</a></li>
                                                    <li><a href="#" data-value="12x" class="divided" style="">{$_L['Divided in']}  12x</a></li>
                                            </ul>
                                            
                                        </div>
                                         
                                        <span class="help-block">{$_L['Ex: 30 60, 3x ou 15 +2x']} </span>
                                    </div>
                                  
                                <div class=" col-md-4 col-sm-4 col-xs-12 destiny_payment_account {if $d['paymentcondition']==3}hide{/if}">
                                    <label>{$_L['Destiny Account']}</label>
                                    <select id="destiny_payment_account" name="destiny_payment_account" class="form-control">
                                        {if not empty($divided[0]["sys_accounts_id"])}
                                            <option selected value="{$divided[0]["sys_accounts_id"]}">{$listAccounts[$divided[0]["sys_accounts_id"]]}</option>
                                        {/if}
                                    </select>
                                </div>
                                    <input type="hidden" id="_dec_point" name="_dec_point" value="{$_c['dec_point']}">
                                    <input type="hidden" value="{$_c['thousands_sep']}" name="_mil_point" id="_mil_point">
                                    <input type="hidden" value="{$_c['currency_code']}" name="_curr_code" id="_curr_code">
                            </div>
                   
                            <div class="row {if $d['paymentcondition']==1}hide{/if}" id="div_especification_payment" >  
                               <div class="table-responsive m-t">
                                    <table class="table invoice-table" id="especification_payment">
                                        <thead>
                                        <tr data-row='fixed'>
                                           <th class='middle'  width="50px">{$_L['N']}</th>
                                           <th class="col-xs-1">{$_L['Days']}</th>
                                           <th class='col-xs-2' >{$_L['Date']}</th>
                                           <th class='col-xs-2' >{$_L['Price']}</th>
                                           <th class='col-xs-2 hide' >{$_L['Payment Method Invoice']}</th>
                                           <th class='col-xs-2 multiplas {if $d['paymentcondition']!=3}hide{/if} {if $d['payment_method']!=-1 || $d['payment_method']!=2}hide{/if}' >{$_L['Payment Method Invoice']}</th>
                                           <th class='col-xs-2 multiplas {if $d['paymentcondition']!=3}hide{/if} {if $d['payment_method']!=-1 || $d['payment_method']!=2}hide{/if}' >{$_L['Details']}</th>
                                           <th class='middle'>{$_L['Obs']}</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                            {foreach $divided as $div}
                                            <tr data-row='{if $rowDivided==0}fixed{/if}'>
                                               <td>
                                                   {$rowDivided+1}
                                               </td> 
                                               <td>
                                                   <input type="number" data-row='{$rowDivided}' class="form-control days" id='days_{$rowDivided}' name="days[]" value="{$div["days"]}"></td>
                                               <td>
                                                   <input type="text" data-row='{$rowDivided}' datepicker class="form-control  due_date_especification_payment" id="duedate_{$rowDivided}" name="duedate[]"  data-date-format="{$_c['formatDate']}" data-auto-close="true" value="{date( $_c['df'], strtotime($div['due_date']))}">
                                               </td>
                                               <td>
                                                   <input type="text" class="form-control divided_price amount" id="price_{$rowDivided}" name="price[]" data-fixed="0" data-value="{$div['value']}" value="{number_format($div['value'],2,$_c['dec_point'],$_c['thousands_sep'])}">
                                               </td>
                                               <td class="multiplas {if $d['paymentcondition']!=3}hide{/if} {if $d['payment_method']!=-1 && $d['payment_method']!=2}hide{/if}">
                                                   <div class="input-group">
                                                       <select id="mtdopgto_{$rowDivided}" name="mtdopgto_{$rowDivided}" {if $d['paymentcondition']==3 &&  $d['payment_method']==2 }disabled{/if} class="form-control mtdopgto_condition" data-row='{$rowDivided}'>
                                                            <option value="0">{$_L['None']}</option>
                                                           {foreach $payment_methods as $pmethod}
                                                                   <option {if $div["p_methods_id"]==$pmethod['id']}selected{/if} value="{$pmethod['id']}">{$pmethod['name']}</option>
                                                           {/foreach}
                                                       </select>
                                                       <span class="input-group-addon  after" style="border:none">
                                                           <a href="#" class=" {if empty($div["params"])}hide{/if} edit_check_data" data-row='{$rowDivided}' id="icon_cheque_{$rowDivided}"><i class="fa fa-list-alt "></i></a>
                                                       </span>
                                                   </div>
                                                       {if not empty($div["params"])}
                                                       <input type="hidden" name="check_name_{$rowDivided}"  id="check_name_{$rowDivided}" value='{$div["param_value"]->check_name}'>
                                                       <input type="hidden" name="check_kind_of_person_{$rowDivided}" id="check_kind_of_person_{$rowDivided}" value='{$div["param_value"]->check_kind_of_person}'>
                                                       <input type="hidden" name="check_cpf_cnpj_{$rowDivided}" id="check_cpf_cnpj_{$rowDivided}" value='{$div["param_value"]->check_doc}'>
                                                       <input type="hidden" name="check_code1_{$rowDivided}"  id="check_code1_{$rowDivided}" value='{$div["param_value"]->check_code->b1}'>
                                                        <input type="hidden" name="check_code2_{$rowDivided}"  id="check_code2_{$rowDivided}" value='{$div["param_value"]->check_code->b2}'>
                                                       <input type="hidden" name="check_code3_{$rowDivided}"  id="check_code3_{$rowDivided}" value='{$div["param_value"]->check_code->b3}'>
                                                      
                                                       <input type="hidden" name="check_edited_{$rowDivided}" id="check_edited_{$rowDivided}" value="1">
                                                       {else}
                                                       <input type="hidden" name="check_name_{$rowDivided}"  id="check_name_{$rowDivided}" >
                                                       <input type="hidden" name="check_kind_of_person_{$rowDivided}" id="check_kind_of_person_{$rowDivided}" >
                                                       <input type="hidden" name="check_cpf_cnpj_{$rowDivided}" id="check_cpf_cnpj_{$rowDivided}" >
                                                       <input type="hidden" name="check_code1_{$rowDivided}"  id="check_code1_{$rowDivided}" >
                                                       <input type="hidden" name="check_code2_{$rowDivided}"  id="check_code2_{$rowDivided}" >
                                                       <input type="hidden" name="check_code3_{$rowDivided}"  id="check_code3_{$rowDivided}" >
                                                       <input type="hidden" name="check_edited_{$rowDivided}" id="check_edited_{$rowDivided}" value="0">

                                                       {/if}
                                                   </td>
                                               <td class="multiplas {if $d['paymentcondition']!=3}hide{/if} {if $d['payment_method']!=-1 || $d['payment_method']!=2}hide{/if}">
                                                   <div class="col-xs-12">
                                                       <select id="destiny_payment_account_{$rowDivided}" name="destiny_payment_account_{$rowDivided}" data-row="{$rowDivided}" class="form-control destiny_payment_account_condition">
                                                            {if not empty ($div["sys_accounts_id"])}
                                                                <option selected value="{$div["sys_accounts_id"]}">{$listAccounts[$div["sys_accounts_id"]]}</option>
                                                            {/if}
                                                        </select>
                                                       <small>{$_L['Destiny Account']}</small>
                                                   </div>

                                               </td>

                                                <td><input type="text" title=""  value="" class="form-control" id="obs_{$rowDivided++}" name="obs[]" value='{$div["obs"]}'>

                                                </td>
                                            </tr>
                                           {/foreach}

                                        </tbody>
                                    </table>
                                </div>
                            </div>
      
                
                                <div class="col-xs-12 div_form delivery-type-delivery">  <h2> {$_L['Conveyor / Volumes']}</h2> </div>
                                <div class="row delivery-type-delivery">
                                    <div class=" col-md-4 col-sm-4 col-xs-12">
                                        <label>{$_L['Shipping method']}</label>
                                        <select id="shipping_method" name="shipping_method" class="form-control">
                                                {foreach $shipping_method as $s}
                                                    {if $s['default']}<option value="{$s['id']}" {if $d['shipping_method_id']==$s['id']}selected{/if} >{$_L[$s['name']]}</option>{else}
                                                         <option {if $d['shipping_method_id']==$s['id']}selected{/if} value="{$s['id']}" >{$s['name']}</option>
                                                    {/if}
                                                {/foreach}
                                        </select>
                                    </div>
                                </div>
                                <div class="row delivery-type-delivery">
                                        
                                    <div class=" col-md-3 col-sm-3 col-xs-12 not_ship_method_3">
                                         <label class="control-label">{$_L['Tracking code']}</label>                                   
                                         <input  value='{$d['tracking_code']}' type="text" maxlength="100" name="tracking_code" class="form-control">
                                    </div>
                                    
                                    <div class=" col-md-6 col-sm-8 col-xs-12 not_ship_method_3">
                                        <label class="control-label">{$_L['Crawl URL']}</label>                                   
                                        <input  value='{$d['craw_url']}' type="text" maxlength="100"  name="craw_url" class="form-control">   
                                    </div>
                                    
                                     <div class=" col-md-3 col-sm-4 col-xs-12 not_ship_method_3">
                                         <label class="control-label">{$_L['Freight']}</label>                                   
                                         <input  value='{$d['freight']}' type="text" id="freight" name="freight" class="form-control amount updateTotais" autocomplete="off" data-a-sign="{$_c['currency_code']} "  data-a-dec="{$_c['dec_point']}" data-a-sep="{$_c['thousands_sep']}" data-d-group="2">
                                     </div>
                                </div>
                                <div class='row not_ship_method_3'>
                                    <div class=" col-md-4 col-sm-4 col-xs-12 not_ship_method_1">
                                        <label class="control-label" >{$_L['Conveyor']}</label>
                                        <select name="conveyor_id" id="conveyor_id" class="form-control select2" style="width: 100%;"></select>
                                    </div>
                                        <input type="hidden" id="selectedConveyor" value="{$d['conveyor_id']}">
                                                                   
                                    <div class=" col-md-3 col-sm-3 col-xs-12">
                                        <label >{$_L['Freight by account']}</label>
                                        <select id="freight_by" name="freight_by" class="form-control">
                                            <option {if $d['freight_by']=='Sender'}selected{/if}  value="Sender">{$_L['Sender']}</option>
                                            <option {if $d['freight_by']=='Addressee'}selected{/if} value="Addressee">{$_L['Addressee']}</option>
                                            <option {if $d['freight_by']=='The 3rd'}selected{/if} value="The 3rd">{$_L['The 3rd']}</option>
                                            <!-- <option value="Free shipping" selected>{$_L['Free shipping']}</option> -->
                                        </select>
                                    </div>

                                    <div class=" col-md-3 col-sm-3 col-xs-12">
                                        <label >{$_L['Ship for shipment']}</label>
                                        <select id="ship_for_shipment" name="ship_for_shipment" class="form-control">
                                            <option {if $d['ship_for_shipment']==0}selected{/if} value="0">{$_L['No']}</option>
                                            <option {if $d['ship_for_shipment']==1}selected{/if}  value="1">{$_L['Yes']}</option>
                                        </select>
                                    </div>

                                    <div class=" col-md-2 col-sm-2 col-xs-12">
                                         <label class="control-label">{$_L['Qtde Volumes']}</label>                                   
                                         <input  value='{$d['qtd_volumes']}' type="text" id="qtd_volumes" name="qtd_volumes" class="form-control integer">
                                    </div>
                                </div>
                        
                                    
                            <div class="col-xs-12 div_form">  <h2> {$_L['Additional data']}</h2> </div>
                                <div class='row'  style="margin-top:20px">
                                    
                                    
                                    <div class="col-md-12 col-sm-12 col-xs-12">
                                        <label class="control-label">{$_L['Contact Notes'] }</label>    
                                        <textarea id="notes" name="notes" class="form-control" rows="5">{$d['notes']}</textarea>
                                        <span class="help-block">{$_L['This information will be printed on the sale and transferred to the remarks of the note.']}</span>
                                    </div>
                                
                                    <div class="col-md-12 col-sm-12 col-xs-12">
                                        <label class="control-label">{$_L['Internal Remarks']}</label>    
                                        <textarea id="internal_remarks" name="internal_remarks" class="form-control" rows="5">{$d['internal_remarks']}</textarea>
                                        <span class="help-block">{$_L['This information is for internal use, so it will not be printed.']}</span>
                                    </div>   
                                    
                                    <div class="col-md-12 col-sm-12 col-xs-12">                               
                                        <label class="control-label" for="tags">{$_L['Bookmark and Share']}</label>
                                        <select name="tags[]" id="tags" class="form-control select2"  multiple="multiple" style="width:100%">
                                        </select>
                                        <input type="hidden" id="tag_selecionada" value="{$d['tags']}">
                                        <span class="help-block"><a href="#" id="add_new_tag">{$_L['Add New Tag']}</a> </span>
                 
                                    </div>
                                    
                                    
                                </div>
                            
                          



                                 
                        <div class="row">
                            <div class="col-md-12">
                                <hr>
                                <div class="form-group">
                                    <div class="col-md-offset-4 col-lg-8">

                                        <button class="md-btn md-btn-primary waves-effect waves-light" type="submit" id="submit"><i class="fa fa-check"></i> {$_L['Submit']}</button> | <a href="{$_url}orders/list/">{$_L['Or Cancel']}</a>


                                    </div>
                                </div>
                            </div>
                        </div>
                         

                    </form>
                </div>
            </div>
        </div>
    </div>


</div>

                              
<div class="modal container  fade-scale" id="modal_check" data-backdrop="static"   role="dialog" aria-hidden="true">
        <form id="modal_add">    
            <input type="hidden" id="update_row">
        <div class="modal-content">
                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
                  </button>
                  <h4 id="" class="modal-title">{$_L['Check Data']}</h4>
                </div>
                <div class="modal-body">
                  
                    <div class="row"> 
                        <div class="form-group col-md-12">
                            <label class="control-label">{$_L['Name']}</label>
                            <input type="text" id='check_name' name='check_name' class="form-control" >
                        </div>
                        <div class="col-md-4 col-xs-12">
                            <label class="control-label" >{$_L['Kind of Person']}</label>
                            <select name="check_kind_of_person" id="check_kind_of_person" class="form-control">
                                <option value="PJ">{$_L['Legal Person']}</option>
                                <option value="PF">{$_L['Physical Person']}</option>
                            </select>
                        </div>
                                        
                        <div id="div_cpf" class="  col-md-6 col-xs-12">
                            <label class="control-label" >{$_L['CPF']}</label>
                            <input type="text" id="check_cpf" name="check_cpf" class="cpf form-control"/>
                        </div>

                        <div id="div_cnpj" class="col-md-6 col-xs-12 ">
                            <label class="control-label" >{$_L['CNPJ']}</label>
                            <input type="text" id="check_cnpj" name="check_cnpj" class="cnpj form-control"/>
                        </div>

                        <div class="form-group col-md-4">
                            <label class="control-label" >{$_L['Check Code']}</label>
                            <input type="text" name='check_code1' id='check_code1' class="form-control check_code1" >
                        </div>
                        <div class="form-group col-md-4">
                            <label class="control-label" >&nbsp;</label>
                            <input type="text" name='check_code2' id='check_code2' class="form-control check_code2" >
                        </div>
                         <div class="form-group col-md-4">
                            <label class="control-label" >&nbsp;</label>
                            <input type="text" name='check_code3' id='check_code3' class="form-control check_code3" >
                        </div>
                    </div>
                   
                </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">{$_L['Cancel']}</button>
                <button type="button" id='registerCheck' class="btn btn-primary">{$_L['Save']}</button>
            </div>
    </div>
        </form>
    </div>
    
            
            

<input type="hidden" id="_lan_no_results_found" value="{$_L['No results found']}">
<input type="hidden" id="_lan_select_account" value="{$_L['Select An Account']}">
{/if}
{include file="sections/footer.tpl"}

Anon7 - 2022
AnonSec Team