
<?php $__env->startSection('title'); ?>
<?php echo e($JournalType); ?> Journal
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>

                    <!-- Page Heading -->
                    <div class="d-sm-flex align-items-center justify-content-between mb-4">
                        <h1 class="h3 mb-0 text-gray-800"><?php echo e($JournalType); ?>  Journal</h1>
                      </div>


                  
                    <div class="card shadow mb-4">
                        <div class="card-header py-3">
                            <h6 class="m-0 font-weight-bold text-primary"   id="formHeader">Process <?php echo e($JournalType); ?>  Journal</h6>
                        </div>
                        <?php if(session('success')): ?>
                            <div class="alert alert-success" id="successMessage"  style="margin: 20px;">
                                <?php echo e(session('success')); ?>

                            </div>
                        <?php endif; ?>
                      
                        <?php if($errors->any()): ?>

                                    <div class="form-group"  id="successMessage"  style="margin: 20px;">
                                        <div class="card bg-warning text-white shadow">
                                            <div class="card-body">
                                        
                                                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <div style="color: red; "><?php echo e($error); ?></div>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        
                                            </div>
                                        </div>
                                    </div>
                                    <?php endif; ?>
                            <form class="card-body" action="<?php echo e(route('saveProcessCashBook')); ?>" method="post"  id="accountTypeForm">
                            <?php echo csrf_field(); ?>
                            <input type="hidden" id="accountId" name="id" value="">
                            <input type="hidden" id="source" name="source" value="<?php echo e($JournalType); ?>">
                           
                                <div class="form-group row">
                                    <div class="col-sm-6 mb-3 mb-sm-0">
                                    <input type="text" class="form-control form-control-user" id="AccCode" placeholder="Journal Code" name="AccCode"  value="<?php echo e($journal); ?>" required readonly>
                                   
                                    </div>
                                    <div class="col-sm-6">
                                        
                                    <input type="date" class="form-control form-control-user" id="date" placeholder="Entry Date" name="date"  value="<?php echo e(old('date', \Carbon\Carbon::now()->format('Y-m-d'))); ?>" required>
                                   
                                   </div>
                                    
                                </div>

                                <div class="form-group row">
                                    <div class="col-sm-6 mb-3 mb-sm-0">
                                    <input type="text" class="form-control form-control-user" id="narr" placeholder="Narration" name="narr"  value="<?php echo e(old('narr')); ?>" required>
                                   
                                    </div>
                                    <div class="col-sm-6">
                                    <select class="form-control form-control-user" id="account" name="account"  value="<?php echo e(old('account')); ?>"  required>
                                        <option value="" disabled selected>Select <?php echo e($JournalType); ?> Account</option>

                                        <?php $__currentLoopData = $Accounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $Account): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        
                                        <option value="<?php echo e($Account->Code); ?>"><?php echo e($Account->Code.'/'.$Account->Name); ?></option>
                                          
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                   </div>
                                    
                                </div>

                                <div class="form-group row">
                                    <div class="col-sm-6 mb-3 mb-sm-0">
                                    <input type="text" class="form-control form-control-user" id="reff" placeholder="Refference" name="reff"  value="<?php echo e(old('reff')); ?>" required>
                                   
                                    </div>
                                    <div class="col-sm-6">

                                    <select class="form-control form-control-user" id="tr" name="tr"  value="<?php echo e(old('tr')); ?>"  required>
                                        <option value="" disabled selected>TR Code</option>
                                        <option value="DR">DR</option>
                                        <option value="CR">CR</option>
                                    </select>
                                        </div>
                                 
                                    
                                </div>

                                <div class="form-group row">
                                    <div class="col-sm-6 mb-3 mb-sm-0">
                                    <select class="form-control form-control-user" id="curr" name="curr"  value="<?php echo e(old('curr')); ?>"  required>
                                        <option value="" disabled selected>Select Currency</option>

                                       
                                        <?php $__currentLoopData = $currencys; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $currency): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        
                                        <option value="<?php echo e($currency->ID); ?>"><?php echo e($currency->Name); ?></option>
                                           
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                    </div>
                                    <div class="col-sm-6">

                                    <input type="text" class="form-control form-control-user" id="amount" placeholder="00.00" name="amount"  value="<?php echo e(old('amount')); ?>" required>
                                   
                                        </div>
                                 
                                    
                                </div>

                               <div style="display: flex;">
                               <input type="submit" style="width: 100px;height: 40px; margin-right: 10px; margin-top: 6px" value="Proccess" class="btn btn-primary btn-user btn-block" id="submitButton"/>

                                <input style="width: 100px;"    type="reset" value="Refresh" class="btn btn-secondary btn-user btn-block"  onclick="hideMessages()"/>
                                    
                               </div>
                                
                                <hr>
                             </form>
                   
                        
                        
                    </div>

                      
                      


                           

                        
                </div>

                        
                        
            </div>

                        

                    
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.nav', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/melsoftrealestat/public_html/re.pro/resources/views//ProcessJournal.blade.php ENDPATH**/ ?>