<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('facture')" class="nav-link <?php echo e($tab == 'facture' ? 'active' : ''); ?>" data-toggle="tab" href="#timeline" role="tab">Facture : Clients - Fournisseurs</a>
                </li>
                <li class="nav-item">
                    <a wire:click.prevent="selectTab('td')" class="nav-link <?php echo e($tab == 'td' ? 'active' : ''); ?>" data-toggle="tab" href="#tasks" role="tab">Transactions diverses</a>
                </li>
                
                
            </ul>
            <div class="tab-content">
                <!-- Timeline Tab start -->
                <div class="tab-pane fade <?php echo e($tab == 'facture' ? 'show active' : ''); ?>" id="timeline" role="tabpanel">
                    <div class="pd-20">
						<div class="row">
							<div class="col-md-12">
							   <form  >

								<div class="row mb-5">
									<div class="col-md-4 px-auto">
										<div class="custom-control custom-radio mb-5">
											<input
												type="radio"
												id="customRadio1"
												name="customRadio"
												class="custom-control-input"
												wire:model.live = "reglement"
												value="singulier"
											/>
											<label class="custom-control-label" for="customRadio1"
											<?php if($reglement === "singulier"): ?> style="color : blue; font-weight:bold;"  <?php endif; ?>
												>Réglement singulier (sur Facture) </label
											>
										</div>
									</div>
									<div class="col-md-1">
										|
									</div>
									<div class="col-md-4">
										<div class="custom-control custom-radio mb-5">
											<input
												type="radio"
												id="customRadio2"
												name="customRadio"
												class="custom-control-input"
												wire:model.live = "reglement"
												value="global"
											/>
											<label class="custom-control-label" for="customRadio2"
												<?php if($reglement === "global"): ?> style="color : blue; font-weight:bold;"  <?php endif; ?>>Réglement global (sur Tiers)</label
											>
										</div>
									</div>
								</div>
								   <div class="row">
										<!-- __BLOCK__ --><?php if($is_singulier): ?>

										<div class="col-md-8">
											<div class="form-group">
												<label for="">Num. Facture</label>
												<input type="text"  id="" class="form-control form-control-sm" wire:model="idFacture" >
												<!-- __BLOCK__ --><?php $__errorArgs = ['idFacture'];
$__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>

										

										<?php else: ?>

									

										<div class="col-md-4">
											<div class="form-group">
												<label for="">Tiers</label>
												

												<select 
												class="form-control form-control-sm"
												wire:model.live="idTiers"
														>
													<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>

												<!-- __BLOCK__ --><?php $__errorArgs = ['idTiers'];
$__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="">Compte de tiers</label>
										<select 
												class="form-control form-control-sm"
												wire:model.live="CompteTiers" 
												id=""
													>
													<option value="">select</option>
												<!-- __BLOCK__ --><?php if($ListCompte_tiers): ?>
													<!-- __BLOCK__ --><?php $__currentLoopData = $ListCompte_tiers; $__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 = ['CompteTiers'];
$__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>

										<?php endif; ?> <!-- __ENDBLOCK__ -->
									   
									   
									   <div class="col-md-4">
										<div class="form-group">
											<label for="">Compte de banque</label>
											
											<select 
												class="form-control form-control-sm"
												wire:model="CompteBanque_facture" 
												id=""
													>
													<option value="">select</option>
												
													<!-- __BLOCK__ --><?php $__currentLoopData = get_compte_banque(); $__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__ -->
												
															
										</select>
											<!-- __BLOCK__ --><?php $__errorArgs = ['CompteBanque_facture'];
$__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="row">
									   <div class="col-md-8">
										   <div class="form-group">
											   <label for="">Objet</label>
											   <input type="text"  class="form-control form-control-sm" wire:model="libelle_facture" >
											   <!-- __BLOCK__ --><?php $__errorArgs = ['libelle_facture'];
$__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="">Justification </label>
                                            <input type="text"  class="form-control form-control-sm" wire:model="justification_facture" >
                                            <!-- __BLOCK__ --><?php $__errorArgs = ['justification_facture'];
$__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="row">
									   <div class="col-md-3">
										   <div class="form-group">
											   <label for="">Montant</label>
											   <input type="text"  class="form-control form-control-sm" wire:model="montant_facture"   >
											   <!-- __BLOCK__ --><?php $__errorArgs = ['montant_facture'];
$__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="">Devise</label>
											   <select class="form-control form-control-sm" wire:model="devise_facture">
												  <!-- __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_facture'];
$__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</label>
											<input type="date"  class="form-control form-control-sm" wire:model="date_facture" >
											<!-- __BLOCK__ --><?php $__errorArgs = ['date_facture'];
$__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="">Pièce justificative</label> <small class="text-muted">(.pdf)</small>
											<input type="file"  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>

								  
									  <button type="button" wire:click="resetForm_Facture" class="btn btn-light">Annuler</button>
									   
									  <!-- __BLOCK__ --><?php if($is_singulier): ?>
										<button type="button" class="btn btn-primary" wire:click="saveTresoBanqueFactureSingulier" > 
											Enregistrer  
										</button>
									  <?php else: ?>
									  	<button type="button" class="btn btn-primary" wire:click="saveTresoBanqueFactureGlobal(<?php echo e(true); ?>)"> 
												Encaissement   
							   			</button>

							   			<button type="button" class="btn btn-danger" wire:click="saveTresoBanqueFactureGlobal"> 
												Décaissement   
								   		</button>
									  <?php endif; ?> <!-- __ENDBLOCK__ -->
							   </form>
							</div>
							
						</div>
                    </div>
                </div>
                <!-- Timeline Tab End -->
                <!-- Tasks Tab start -->
                <div class="tab-pane fade <?php echo e($tab == 'td' ? '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">
											<label for="">Compte</label>
											<input type="text"   class="form-control form-control-sm" wire:model="CompteTiers_td" >
											<!-- __BLOCK__ --><?php $__errorArgs = ['CompteTiers_td'];
$__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="">Compte de banque</label>
										
										<select 
												class="form-control form-control-sm"
												wire:model="CompteBanque_td" 
												id=""
													>
													<option value="">select</option>
												
													<!-- __BLOCK__ --><?php $__currentLoopData = get_compte_banque(); $__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__ -->
												
															
										</select>
										<!-- __BLOCK__ --><?php $__errorArgs = ['CompteBanque_td'];
$__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="row">
								   <div class="col-md-8">
									   <div class="form-group">
										   <label for="">Objet</label>
										   <input type="text"  class="form-control form-control-sm" wire:model="libelle_td" >
										   <!-- __BLOCK__ --><?php $__errorArgs = ['libelle_td'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
											   <span class="text-danger"><?php echo e($message); ?></span>
										   <?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="">Justification </label>
										<input type="text"  class="form-control form-control-sm" wire:model="justification_td" >
										<!-- __BLOCK__ --><?php $__errorArgs = ['justification_td'];
$__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="row">
								   <div class="col-md-3">
									   <div class="form-group">
										   <label for="">Montant</label>
										   <input type="text"  class="form-control form-control-sm" wire:model="montant_td"   >
										   <!-- __BLOCK__ --><?php $__errorArgs = ['montant_td'];
$__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="">Devise</label>
										   <select class="form-control form-control-sm" wire:model="devise_td">
											  <!-- __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_td'];
$__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</label>
										<input type="date"  class="form-control form-control-sm" wire:model="date_td" >
										<!-- __BLOCK__ --><?php $__errorArgs = ['date_td'];
$__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="">Pièce justificative</label> <small class="text-muted">(.pdf)</small>
										<input type="file"  class="form-control form-control-sm" wire:model="piece_justif_td" >
										<!-- __BLOCK__ --><?php $__errorArgs = ['piece_justif_td'];
$__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_TD" class="btn btn-light">Annuler</button>
									  <button type="button" class="btn btn-primary" wire:click="saveTresoBanqueTD(<?php echo e(true); ?>)"> 
											Encaissement   
									   </button>

									   <button type="button" class="btn btn-danger" wire:click="saveTresoBanqueTD"> 
											Décaissement   
									   </button>
						   </form>
						</div>
						
					</div>
                   </div>
                </div>
                <!-- Tasks Tab End -->
                

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

</div>



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

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