<div>
    
    <div wire:ignore.self
									class="modal fade"
									id="confirmation_modal_achat"
									tabindex="-1"
									role="dialog"
									aria-hidden="true"
                                    data-backdrop="static"
								>
									<div
										class="modal-dialog modal-dialog-centered"
										role="document"
									>
										<div class="modal-content">
											<div class="modal-body text-center font-18">
												<h4 class="padding-top-30 mb-30 weight-500">
													Voulez-vous faire ce changement?
												</h4>
												<div
													class="padding-bottom-30 row"
													style="max-width: 170px; margin: 0 auto"
												>
													<div class="col-6">
														<button
															type="button"
															class="btn btn-secondary border-radius-100 "
															data-dismiss="modal"
														>
															<i class="fa fa-times"></i> Non
														</button>
														
													</div>
													<div class="col-6">
														<button
															type="button"
															class="btn btn-primary border-radius-100 "
															wire:click=""
														>
															<i class="fa fa-check"></i> Oui
														</button>
														
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>











    <div class="profile-tab height-100-p">
        <div class="tab height-100-p">
            <ul class="nav nav-tabs customtab" role="tablist">
                <li class="nav-item">
                    <a wire:click.prevent="selectTab('achat')" class="nav-link <?php echo e($tab == 'achat' ? 'active' : ''); ?>" data-toggle="tab" href="#timeline" role="tab">Achats</a>
                </li>
                <li class="nav-item">
                    <a wire:click.prevent="selectTab('vente')" class="nav-link <?php echo e($tab == 'vente' ? 'active' : ''); ?>" data-toggle="tab" href="#tasks" role="tab">Ventes</a>
                </li>
                <li class="nav-item">
                    <a wire:click.prevent="selectTab('od')" class="nav-link <?php echo e($tab == 'od' ? 'active' : ''); ?>" data-toggle="tab" href="#od" role="tab">Opérations diverses</a>
                </li>
                
            </ul>
            <div class="tab-content">
                <!-- Timeline Tab start -->
                <div class="tab-pane fade <?php echo e($tab == 'achat' ? 'show active' : ''); ?>" id="timeline" role="tabpanel">
                    <div class="pd-20">
                    <form >
                       <div class="row">
                         <div class="col-md-6">
                           
                                <div class="row mb-2">
                                    <div class="col-md-6">
                                       
                                            <label for="">Date <span style="color:red;">*</span></label>
                                            <input type="date"  class="form-control form-control-sm" wire:model="date_achat" tabindex="1" >
                                            <!-- __BLOCK__ --><?php $__errorArgs = ['date_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                        
                                    </div>
                                    <div class="col-md-6">
                                        
                                            <label for="">Réference doc.<span style="color:red;">*</span></label>
                                            <input type="text"  class="form-control form-control-sm" wire:model="reference_achat" tabindex="2"   >
                                            <!-- __BLOCK__ --><?php $__errorArgs = ['reference_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                        
                                    </div>
                                    </div>

                              
                                    <div class=" row mb-2">
                                        <div class="col-md-12">
                                           
                                                <label for="">Libellé<span style="color:red;">*</span></label>
                                                <input type="text"  class="form-control form-control-sm" wire:model="libelle_achat" tabindex="5"   >
                                                <!-- __BLOCK__ --><?php $__errorArgs = ['libelle_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                            
                                        </div>
                                    </div>

                                    <div class="row mb-2">
                                    <div class="col-md-6">
                                       
                                            <label for="">Fournisseur <span style="color:red;">*</span></label>
                                          
                                            <select 
                                                class="form-control form-control-sm"
                                                wire:model.live="idFournisseur_achat"
                                                tabindex="6"
                                                        >
                                                    <option value="">select</option>
                                                <!-- __BLOCK__ --><?php $__currentLoopData = get_tiers('fourn'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $info): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($info->id); ?>"><?php echo e($info->denomination); ?> </option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                                            
                                            </select>
                                            
                                        
                                    </div>
                                    <div class="col-md-6">
                                 
                                            <label for="">Compte tiers</label>
                                            
                                            <select 
                                                        class="form-control form-control-sm"
                                                        wire:model.live="compte_tiers_achat" 
                                                        tabindex="7"
                                                                >
                                                            <option value="" disabled></option>
                                                        <!-- __BLOCK__ --><?php if($ListCompte_achat): ?>
                                                            <!-- __BLOCK__ --><?php $__currentLoopData = $ListCompte_achat; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $compte): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <option <?php if($value_tiers == $compte->num_compte): echo 'selected'; endif; ?> value="<?php echo e($compte->num_compte); ?>"><?php echo e($compte->num_compte); ?> - <?php echo e($compte->nom_compte); ?></option>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                                        <?php endif; ?> <!-- __ENDBLOCK__ -->
                                                                    
                                            </select>
                                            <!-- __BLOCK__ --><?php $__errorArgs = [''];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                            
                                    
                                       
                                    </div>
                                 
                                </div>
                            
                           
                                <div class="row mb-3">
                                    <div class="col-md-4">
                                        
                                            <label for="">Compte Géneral</label>
                                            
                                            <input type="text"  class="form-control form-control-sm" wire:model="compte_achat" maxlength="8"  tabindex="9">
                                            
                                            <!-- __BLOCK__ --><?php $__errorArgs = ['compte_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                            
                                        
                                       
                                    </div>
                                    <div class="col-md-3">
                                        
                                            <label for="">Débit</label>
                                            <input type="text"  class="form-control form-control-sm" wire:model="debit_achat" wire:keydown.enter="addItemby"
                                            tabindex="10"
                                            >
                                            <!-- __BLOCK__ --><?php $__errorArgs = ['debit_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                        
                                    </div>
                                    <div class="col-md-3">
                                        
                                            <label for="">Crédit</label>
                                            <input type="text"  class="form-control form-control-sm" wire:model="credit_achat" wire:keydown.enter="addItemby"
                                            tabindex="11"
                                            >
                                            <!-- __BLOCK__ --><?php $__errorArgs = ['credit_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                        
                                    </div>
                                    <div class="col-md-2 ">
                                        <div class="row " style="padding-top: 38px;">
                                            
                                            <span class="badge  badge-primary" wire:click="addItem_achat" style="cursor:pointer;" title="Ajouter" >
                                               
                                                <i class="icon-copy fa fa-check" ></i>
                                            </span> 
                                            &nbsp;&nbsp;
                                            <span class="badge badge-dark" wire:click="equilibrerJAchat" style="cursor:pointer;" title="Equilibrer" >
                                                <i class="icon-copy fa fa-location-arrow" ></i>
                                                
                                            </span>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">

                                    <div class="col-md-8 offset-md-2">
                      

                                        <!-- __BLOCK__ --><?php $__errorArgs = ['MyArray_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <table border="0" class="table-striped table-sm" style="font-size:0.8em; width:100%;">
                                            <thead>
                                                <tr>
                                                    <td>compte</td>
                                                    <td >débit</td>
                                                    <td >crédit</td>
                                                   
                                                </tr>
                                            </thead>    
                                            <tbody>
                                                <tr>
                                                    <td colspan="3" align="center"  class="text-danger" >
                                                            <?php echo e($message); ?>

                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                    </div>
        
                                </div>
                           
                                  
                         </div>
                         <div class="col-md-6">
                            <div class="row mb-3">
                                <div class="col-md-6">
                                    
                                        <label for="">Numéro facture</label>
                                        <input type="text"  class="form-control form-control-sm" wire:model="NumFacture_achat" tabindex="3"  >
                                        <!-- __BLOCK__ --><?php $__errorArgs = ['NumFacture_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                            
                                </div>

                                <div class="col-md-6">
                                    
                                        <label for="">Devise <span style="color:red;">*</span></label>
                                        <select class="form-control form-control-sm" wire:model="devise_achat" tabindex="4">
                                           <!-- __BLOCK__ --><?php $__currentLoopData = get_select_devise(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $devise): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                               <option value="<?php echo e($devise->devise); ?>"><?php echo e($devise->devise); ?> - <?php echo e($devise->intitule); ?></option>
                                           <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                        </select>
                                        <!-- __BLOCK__ --><?php $__errorArgs = ['devise_achat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                    
                                </div>
                            </div>

                            <div class="row mx-1" style="border: 1px solid black; height: 220px; position:relative;">
                                <div style="width: 100%;">
                                    
                                    <!-- __BLOCK__ --><?php if(empty($MyArray_achat)): ?>
                                         
                                    <?php else: ?>
                                        <table border="0" class="table-striped table-sm" style="font-size:0.8em; width:100%;">
                                        <thead>
                                            <tr style="font-weight: 600;">
                                                <td>compte</td>
                                                <td>intitulé de compte</td>
                                                <td align="right">débit</td>
                                                <td align="right">crédit</td>
                                                <td></td>
                                            </tr>
                                        </thead>    
                                        <tbody>
                                            <!-- __BLOCK__ --><?php $__currentLoopData = $MyArray_achat; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            
                                                <tr>
                                                    <td><?php echo e($data['compte']); ?></td>
                                                    <td><?php echo e($data['intitule']); ?></td>
                                                    <td align="right"> <!-- __BLOCK__ --><?php if($data['debit'] == 0): ?> <?php echo e(''); ?>  <?php else: ?> <?php echo e(get_format_montant($data['debit'])); ?> <?php endif; ?> <!-- __ENDBLOCK__ --> </td>
                                                    <td align="right"><!-- __BLOCK__ --><?php if($data['credit'] == 0): ?> <?php echo e(''); ?>  <?php else: ?> <?php echo e(get_format_montant($data['credit'])); ?> <?php endif; ?> <!-- __ENDBLOCK__ --> </td>
                                                    <td align="center" ><span class="text-danger"  wire:click="removeItem_achat(<?php echo e($data['compte']); ?>)"  style="cursor:pointer;"><i class="fa fa-times"></i></span></td>
                                                </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->

                                            
                                        </tbody>
                                        </table>
                                    <?php endif; ?> <!-- __ENDBLOCK__ -->
                                </div>
                                
                                <div class="py-1" style="height:40px;border: 0px solid red; position:absolute;
                                bottom:0;width:100%; display:flex; justify-content:space-around;background-color:<?php if($isEgal_achat): ?> #1D8348 <?php else: ?> #EAECEE <?php endif; ?>">
                                   <span style="font-size:0.8em;">
                                    Débit : <strong style="font-size:1.3em;font-weight:700;color:<?php if($isEgal_achat): ?> white <?php else: ?> '' <?php endif; ?>;"><?php echo e(get_format_montant($total_debit)); ?></strong></span>  
                                   <span class="py-1">|</span> 
                                   <span style="font-size:0.8em;">
                                    Crédit : <strong style="font-size:1.3em;font-weight:700;color:<?php if($isEgal_achat): ?> white <?php else: ?> '' <?php endif; ?>;"><?php echo e(get_format_montant($total_credit)); ?></strong></span> 
                                </div>
                            </div>

                         </div>
                        
                       </div>
                       <div class="row zone_btn">
                                <button type="button" wire:click="resetForm_achat" class="btn btn-light btn-sm">Annuler</button>
                                            
                                <button type="button" class="btn btn-primary btn-sm" wire:click="saveAchat" wire:loading.attr="disabled" style="width:15%;" <?php if(!$isEgal_achat): ?> disabled <?php endif; ?>> 
                                        
                                        <div class="spinner-border spinner-border-sm"  role="status" wire:loading wire:target="saveAchat">
                                            <span class="visually-hidden"></span>
                                        </div>
                        
                                        <div wire:loading.remove wire:target="saveAchat">
                                            Enregistrer 
                                        </div>
                                    
                                </button>

                                <button type="button" wire:click="$dispatch('showFactureEnCours')" class="btn btn-success btn-sm">Factures en cours</button>
                                <button type="button" wire:click="$dispatch('NewTiers')" class="btn btn-outline-primary btn-sm">Ajouter Tiers</button>
                       </div>
                    </form>
                    </div>
                </div>
                <!-- Timeline Tab End -->
                <!-- Tasks Tab start -->
                <div class="tab-pane fade <?php echo e($tab == 'vente' ? 'show active' : ''); ?>" id="tasks" role="tabpanel">
                   <div class="pd-20 profile-task-wrap">
                    <div class="row">
                        <div class="col-md-12">
                           <form  >
                               <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group"  wire:ignore>
                                        <label for="">Client <span style="color:red;">*</span></label>
                                      
                                        <select 
                                            class="form-control form-control-sm"
                                            style="width: 100%; height: 50px;"
                                            id="Select_tiers_vente"
                                                    >
                                                <option value="">select</option>
                                            <!-- __BLOCK__ --><?php $__currentLoopData = get_tiers('client'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $info): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($info->id); ?>"><?php echo e($info->denomination); ?> </option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                                        
                                        </select>
                                        
                                    </div>
                                </div>
                                   <div class="col-md-3">
                                       <div class="form-group">
                                           <label for="">N° Facture <span style="color:red;">*</span></label>
                                           <input type="text"  class="form-control form-control-sm" wire:model="NumFacture_vente"  >
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['NumFacture_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                                   <div class="col-md-3">
                                       <div class="form-group">
                                           <label for="">Date <span style="color:red;">*</span></label>
                                           <input type="date"  class="form-control form-control-sm" wire:model="date_vente" >
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['date_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                               </div>
                               <div class="form-group row">
                                <label class="col-sm-12 col-md-2 col-form-label">Objet <span style="color:red;">*</span></label>
                                <div class="col-sm-12 col-md-10">
                                    <input type="text"  class="form-control form-control-sm" wire:model="libelle_vente" />
                                    <!-- __BLOCK__ --><?php $__errorArgs = ['libelle_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <small class="form-text text-danger"><?php echo e($message); ?></small>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                </div>
                            </div>
                               <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group" >
                                        <label for="">Compte</label>
                                       
                                        <select 
                                                    class="form-control form-control-sm"
                                                    wire:model.live="compte_vente" 
                                                    id="Select_Compte_ventee"
                                                            >
                                                        <option value="">select</option>
                                                   
                                                    <!-- __BLOCK__ --><?php if($ListCompte_vente): ?>
                                                        <!-- __BLOCK__ --><?php $__currentLoopData = $ListCompte_vente; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $compte): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <option value="<?php echo e($compte->num_compte); ?>"><?php echo e($compte->num_compte); ?> - <?php echo e($compte->nom_compte); ?></option>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                                    <?php endif; ?> <!-- __ENDBLOCK__ -->
                                                                
                                        </select>
                                        <!-- __BLOCK__ --><?php $__errorArgs = ['compte_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                        
                                    </div>
                                   
                                </div>
                                   <div class="col-md-2">
                                       <div class="form-group">
                                           <label for="">Débit</label>
                                           <input type="text"  class="form-control form-control-sm" wire:model="debit_vente" <?php if($readonly_debit_vente): ?> readonly <?php endif; ?>>
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['debit_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                                   <div class="col-md-2">
                                       <div class="form-group">
                                           <label for="">Crédit</label>
                                           <input type="text"  class="form-control form-control-sm" wire:model="credit_vente" <?php if($readonly_credit_vente): ?> readonly <?php endif; ?>>
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['credit_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                                   <div class="col-md-2 ">
                                    <div class="row " style="padding-top: 38px;">
                                        
                                        <span class="badge  badge-primary" wire:click="addItem_vente" style="cursor:pointer;" title="Ajouter" >
                                            <i class="icon-copy dw dw-right-arrow-4"> </i>
                                        </span> 
                                        &nbsp;&nbsp;
                                        <span class="badge badge-primary" wire:click="annulerItem_vente" style="cursor:pointer;" title="Annuler" ><i class="icon-copy dw dw-delete-1"></i></span>
                                    </div>
                                </div>
                               </div>
                               <div class="row">

                                <div class="col-md-8 offset-md-2">
                  
                                    <!-- __BLOCK__ --><?php if(empty($MyArray_vente)): ?>
                                     
                                    <?php else: ?>
                                        <table border="0" class="table-striped table-sm" style="font-size:0.8em; width:100%;">
                                        <thead>
                                            <tr>
                                                <td>compte</td>
                                                <td align="right">débit</td>
                                                <td align="right">crédit</td>
                                                <td></td>
                                            </tr>
                                        </thead>    
                                        <tbody>
                                            <!-- __BLOCK__ --><?php $__currentLoopData = $MyArray_vente; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            
                                                <tr>
                                                    <td><?php echo e($data['compte']); ?></td>
                                                    <td align="right"><?php echo e(get_format_montant($data['debit'])); ?></td>
                                                    <td align="right"><?php echo e(get_format_montant($data['credit'])); ?></td>
                                                    <td align="center" ><span class="text-danger"  wire:click="removeItem_achat(<?php echo e($data['compte']); ?>)"  style="cursor:pointer;"><i class="fa fa-times"></i></span></td>
                                                </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->

                                            
                                        </tbody>
                                        </table>
                                    <?php endif; ?> <!-- __ENDBLOCK__ -->

                                    <!-- __BLOCK__ --><?php $__errorArgs = ['MyArray_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <table border="0" class="table-striped table-sm" style="font-size:0.8em; width:100%;">
                                        <thead>
                                            <tr>
                                                <td>compte</td>
                                                <td >débit</td>
                                                <td >crédit</td>
                                               
                                            </tr>
                                        </thead>    
                                        <tbody>
                                            <tr>
                                                <td colspan="3" align="center"  class="text-danger" >
                                                        <?php echo e($message); ?>

                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                </div>
    
                            </div>
                               <div class="row">
                                   <div class="col-md-6">
                                       <div class="form-group">
                                           <label for="">Total <span style="color:red;">*</span></label>
                                           <input type="text"  class="form-control form-control-sm" wire:model="total_ttc_vente" readonly  >
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['total_ttc_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>

                                   <div class="col-md-6">
                                       <div class="form-group">
                                           <label for="">Devise <span style="color:red;">*</span></label>
                                           <select class="form-control form-control-sm" wire:model="devise_vente">
                                              <!-- __BLOCK__ --><?php $__currentLoopData = get_select_devise(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $devise): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                  <option value="<?php echo e($devise->devise); ?>"><?php echo e($devise->devise); ?> - <?php echo e($devise->intitule); ?></option>
                                              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                           </select>
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['devise_vente'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                               </div>
                               <button type="button" wire:click="resetForm_vente" class="btn btn-light">Annuler</button>
                                    
                               <button type="button" class="btn btn-primary" wire:click="saveVente" wire:loading.attr="disabled" style="width:15%;"> 
                                       
                                        <div class="spinner-border spinner-border-sm"  role="status" wire:loading wire:target="saveVente">
                                           <span class="visually-hidden"></span>
                                       </div>
                       
                                       <div wire:loading.remove wire:target="saveVente">
                                            Enregistrer 
                                       </div>
                                      
                               </button>

                               <button type="button" wire:click="$dispatch('showFactureEnCours')" class="btn btn-success">Factures en cours</button>
                           </form>
                        </div>
                        
                      </div>
                 
                   </div>
                </div>
                <!-- Tasks Tab End -->
                <!-- Tasks Tab OD -->
                   <div class="tab-pane fade <?php echo e($tab == 'od' ? 'show active' : ''); ?>" id="od" role="tabpanel">
                    <div class="pd-20 profile-task-wrap">
                    <div class="row">
                        <div class="col-md-12">
                           <form enctype="multipart/form-data" >
                               <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group"  wire:ignore>
                                        <label for="">Tiers <span style="color:red;">*</span></label>
                                      
                                        <select 
                                            class="form-control form-control-sm"
                                            style="width: 100%; height: 50px;"
                                            id="Select_tiers_od"
                                                    >
                                                <option value="">select</option>
                                                <optgroup label="FOURNISSEUR">  
                                                    <!-- __BLOCK__ --><?php $__currentLoopData = get_tiers('fourn'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $info): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <option value="<?php echo e($info->id); ?>"><?php echo e($info->denomination); ?> </option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                                </optgroup>
                                                <optgroup label="CLIENT">  
                                                    <!-- __BLOCK__ --><?php $__currentLoopData = get_tiers('client'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $info): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <option value="<?php echo e($info->id); ?>"><?php echo e($info->denomination); ?> </option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                                </optgroup>
                                        </select>
                                    </div>
                                </div>
                                   <div class="col-md-3">
                                        <div class="form-group">
                                            <label for="">Justification</label>
                                            <input type="text"  class="form-control form-control-sm" wire:model="piece_justif" >
                                            <!-- __BLOCK__ --><?php $__errorArgs = ['piece_justif'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                        </div>
                                    </div>
                                   <div class="col-md-3">
                                       <div class="form-group">
                                           <label for="">Date <span style="color:red;">*</span></label>
                                           <input type="date"  class="form-control form-control-sm" wire:model="date_od" >
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['date_od'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                               </div>
                               
                                <div class="form-group row">
                                    <label class="col-sm-12 col-md-2 col-form-label">Objet <span style="color:red;">*</span></label>
                                    <div class="col-sm-12 col-md-10">
                                        <input type="text"  class="form-control form-control-sm" wire:model="libelle_od" />
                                        <!-- __BLOCK__ --><?php $__errorArgs = ['libelle_od'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                    </div>
                                </div>
                               
                               <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group" >
                                        <label for="">Compte</label>
                                       
                                        <select 
                                                    class="form-control form-control-sm"
                                                    wire:model="compte_od"
                                                    id="Select_Compte_odd"
                                                            >
                                                        <option value="">select</option>
                                                    <!-- __BLOCK__ --><?php if($ListCompte_od): ?>
                                                        <!-- __BLOCK__ --><?php $__currentLoopData = $ListCompte_od; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $compte): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <option value="<?php echo e($compte->num_compte); ?>"><?php echo e($compte->num_compte); ?> - <?php echo e($compte->nom_compte); ?></option>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                                    <?php endif; ?> <!-- __ENDBLOCK__ -->
                                                                
                                        </select>
                                        <!-- __BLOCK__ --><?php $__errorArgs = ['compte_od'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                    </div>
                                    
                                </div>
                                   <div class="col-md-2">
                                       <div class="form-group">
                                           <label for="">Débit</label>
                                           <input type="text"  class="form-control form-control-sm" wire:model="debit_od" >
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['debit_od'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                                   <div class="col-md-2">
                                       <div class="form-group">
                                           <label for="">Crédit</label>
                                           <input type="text"  class="form-control form-control-sm" wire:model="credit_od" >
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['credit_od'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                                   <div class="col-md-2 ">
                                    <div class="row " style="padding-top: 38px;">
                                        
                                        <span class="badge  badge-primary" wire:click="addItem_od" style="cursor:pointer;" title="Ajouter" >
                                            <i class="icon-copy dw dw-right-arrow-4"> </i>
                                        </span> 
                                        &nbsp;&nbsp;
                                        <span class="badge badge-primary" wire:click="annulerItem_od" style="cursor:pointer;" title="Annuler" ><i class="icon-copy dw dw-delete-1"></i></span>
                                    </div>
                                </div>
                               </div>
                               <div class="row">

                                <div class="col-md-8 offset-md-2">
                  
                                    <!-- __BLOCK__ --><?php if(empty($MyArray_od)): ?>
                                     
                                    <?php else: ?>
                                        <table border="0" class="table-striped table-sm" style="font-size:0.8em; width:100%;">
                                        <thead>
                                            <tr>
                                                <td>compte</td>
                                                <td align="right">débit</td>
                                                <td align="right">crédit</td>
                                                <td></td>
                                            </tr>
                                        </thead>    
                                        <tbody>
                                            <!-- __BLOCK__ --><?php $__currentLoopData = $MyArray_od; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            
                                                <tr>
                                                    <td><?php echo e($data['compte']); ?></td>
                                                    <td align="right"><?php echo e(get_format_montant($data['debit'])); ?></td>
                                                    <td align="right"><?php echo e(get_format_montant($data['credit'])); ?></td>
                                                    <td align="center" ><span class="text-danger"  wire:click="removeItem_achat(<?php echo e($data['compte']); ?>)"  style="cursor:pointer;"><i class="fa fa-times"></i></span></td>
                                                </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->

                                            
                                        </tbody>
                                        </table>
                                    <?php endif; ?> <!-- __ENDBLOCK__ -->

                                    <!-- __BLOCK__ --><?php $__errorArgs = ['MyArray_od'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <table border="0" class="table-striped table-sm" style="font-size:0.8em; width:100%;">
                                        <thead>
                                            <tr>
                                                <td>compte</td>
                                                <td >débit</td>
                                                <td >crédit</td>
                                               
                                            </tr>
                                        </thead>    
                                        <tbody>
                                            <tr>
                                                <td colspan="3" align="center"  class="text-danger" >
                                                        <?php echo e($message); ?>

                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                </div>
    
                            </div>
                               <div class="row">
                                   <div class="col-md-4">
                                       <div class="form-group">
                                           <label for="">Total <span style="color:red;">*</span></label>
                                           <input type="text"  class="form-control form-control-sm" wire:model="total_ttc_od" readonly>
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['total_ttc_od'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                 <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                                   <div class="col-md-4">
                                       <div class="form-group">
                                           <label for="">Devise <span style="color:red;">*</span></label>
                                           <select class="form-control form-control-sm" wire:model="devise_od">
                                              <!-- __BLOCK__ --><?php $__currentLoopData = get_select_devise(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $devise): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                  <option value="<?php echo e($devise->devise); ?>"><?php echo e($devise->devise); ?> - <?php echo e($devise->intitule); ?></option>
                                              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                           </select>
                                           <!-- __BLOCK__ --><?php $__errorArgs = ['devise_od'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <small class="form-text text-danger"><?php echo e($message); ?></small>
                                           <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                       </div>
                                   </div>
                                   <div class="col-md-4">
                                    <div class="form-group">
                                        <label for="">Pièce justificative</label> <small class="text-muted">(.pdf)</small>
                                        <input type="file"  class="form-control form-control-sm" wire:model="file_piece_justif" accept=".pdf">
                                        <!-- __BLOCK__ --><?php $__errorArgs = ['file_piece_justif'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                    </div>
                                </div>
                                
                               </div>
                               <button type="button" wire:click="resetForm_od" class="btn btn-light">Annuler</button>
                                    
                               <button type="button" class="btn btn-primary" wire:click="saveOD" wire:loading.attr="disabled" style="width:15%;"> 
                                       
                                        <div class="spinner-border spinner-border-sm"  role="status" wire:loading wire:target="saveOD">
                                           <span class="visually-hidden"></span>
                                       </div>
                       
                                       <div wire:loading.remove wire:target="saveOD">
                                            Enregistrer 
                                       </div>
                                      
                               </button>

                               <button type="button" wire:click="$dispatch('showFactureEnCours')" class="btn btn-success">voir Od Tiers</button>
                      
                           </form>
                        </div>
                       
                      </div>
                 
                   </div>
                  
                    </div>
                 </div>
              
        </div>
    </div>

</div>


<?php $__env->startPush('scripts'); ?>
<script>

$(document).ready(function(){

    // partie Achat **************

    window.addEventListener('resetSelect_Tiers_achat', event => {
                     $("#Select_tiers_achat").select2().val(event.detail.data).trigger('change');
				})
    $('#Select_tiers_achat').select2({
        placeholder: {
                            id: "", // the value of the option
                            text: 'Select Fournisseur'
                    },
        allowClear: true
    });
    $('#Select_tiers_achat').on('change',function(e){
        var data = $(this).select2('val');
        window.Livewire.find('<?php echo e($_instance->getId()); ?>').set('idFournisseur_achat',data);
    });


    window.addEventListener('resetSelect_Compte_achat', event => {
                     $("#Select_Compte_achat").select2().val(event.detail.data).trigger('change');
				})
    $('#Select_Compte_achat').select2({
        placeholder: {
                            id: "", // the value of the option
                            text: 'Select Compte'
                    },
        allowClear: true
    });
    $('#Select_Compte_achat').on('change',function(e){
        var data = $(this).select2('val');
        window.Livewire.find('<?php echo e($_instance->getId()); ?>').set('compte_achat',data);
    });



 

    // partie Vente **************
    
    window.addEventListener('resetSelect_Tiers_vente', event => {
                     $("#Select_tiers_vente").select2().val(event.detail.data).trigger('change');
				})
    $('#Select_tiers_vente').select2({
        placeholder: {
                            id: "", // the value of the option
                            text: 'Select Client'
                    },
        allowClear: true
    });
    $('#Select_tiers_vente').on('change',function(e){
        var data = $(this).select2('val');
        window.Livewire.find('<?php echo e($_instance->getId()); ?>').set('idFournisseur_vente',data);
    });


    window.addEventListener('resetSelect_Compte_vente', event => {
                     $("#Select_Compte_vente").select2().val(event.detail.data).trigger('change');
				})
    $('#Select_Compte_vente').select2({
        placeholder: {
                            id: "", // the value of the option
                            text: 'Select Compte'
                    },
        allowClear: true
    });
    $('#Select_Compte_vente').on('change',function(e){
        var data = $(this).select2('val');
        window.Livewire.find('<?php echo e($_instance->getId()); ?>').set('compte_vente',data);
    });



// partie OD **************
    
window.addEventListener('resetSelect_Tiers_od', event => {
                     $("#Select_tiers_od").select2().val(event.detail.data).trigger('change');
				})
    $('#Select_tiers_od').select2({
        placeholder: {
                            id: "", // the value of the option
                            text: 'Select Tiers'
                    },
        allowClear: true
    });
    $('#Select_tiers_od').on('change',function(e){
        var data = $(this).select2('val');
        window.Livewire.find('<?php echo e($_instance->getId()); ?>').set('idFournisseur_od',data);
    });


    window.addEventListener('resetSelect_Compte_od', event => {
                     $("#Select_Compte_od").select2().val(event.detail.data).trigger('change');
				})
    $('#Select_Compte_od').select2({
        placeholder: {
                            id: "", // the value of the option
                            text: 'Select Compte'
                    },
        allowClear: true
    });
    $('#Select_Compte_od').on('change',function(e){
        var data = $(this).select2('val');
        window.Livewire.find('<?php echo e($_instance->getId()); ?>').set('compte_od',data);
    });





});


document.addEventListener("loadSelectCompteAchat", function (event) {
    
        //window.livewire.on('loadSelectCompteAchat',()=>{
            $('#Select_Compte_achat').select2();
        //}); 
    });


</script>
    
<?php $__env->stopPush(); ?>
<?php /**PATH D:\laravel_apps\big-manager\resources\views/livewire/saisie-journaux.blade.php ENDPATH**/ ?>