<div class="row mini_print">
  <div class="col-sm-12">

    
    <h4 style="margin-top:0; margin-bottom:10px; font-weight:bold; border-bottom:2px solid #333; padding-bottom:5px;">
      <?php echo app('translator')->get('cash_register.cash_drawer_summary'); ?>
    </h4>
    <table class="table table-condensed">
      <tr>
        <td><?php echo app('translator')->get('cash_register.opening_balance'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->cash_in_hand, false); ?></span></td>
      </tr>
      <tr>
        <td>(+) <?php echo app('translator')->get('cash_register.cash_received_sales'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cash, false); ?></span></td>
      </tr>
      <tr>
        <td>(+) <?php echo app('translator')->get('cash_register.cash_received_due_payment'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cash_advance_payment, false); ?></span></td>
      </tr>
      <tr>
        <td>(-) <?php echo app('translator')->get('cash_register.cash_refunds'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cash_refund, false); ?></span></td>
      </tr>
      <tr>
        <td>(-) <?php echo app('translator')->get('cash_register.cash_expenses'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cash_expense, false); ?></span></td>
      </tr>
      <tr class="success" style="font-weight:bold;">
        <td><b><?php echo app('translator')->get('cash_register.expected_cash_in_drawer'); ?>:</b></td>
        <td>
          <b><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->cash_in_hand + $register_details->total_cash + $register_details->total_cash_advance_payment - $register_details->total_cash_refund - $register_details->total_cash_expense, false); ?></span></b>
        </td>
      </tr>
    </table>

    <hr>

    
    <h4 style="margin-bottom:10px; font-weight:bold; border-bottom:2px solid #333; padding-bottom:5px;">
      <?php echo app('translator')->get('cash_register.sales_summary'); ?>
    </h4>
    <table class="table table-condensed">
      <tr>
        <td><?php echo app('translator')->get('cash_register.gross_sales'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($details['transaction_details']->total_sales, false); ?></span></td>
      </tr>
      <tr>
        <td>(-) <?php echo app('translator')->get('cash_register.total_refund'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_refund, false); ?></span></td>
      </tr>
      <tr class="success" style="font-weight:bold;">
        <td><b><?php echo app('translator')->get('cash_register.net_sales'); ?>:</b></td>
        <td>
          <b><span class="display_currency" data-currency_symbol="true"><?php echo e($details['transaction_details']->total_sales - $register_details->total_refund, false); ?></span></b>
        </td>
      </tr>
    </table>

    <hr>

    
    <h4 style="margin-bottom:10px; font-weight:bold; border-bottom:2px solid #333; padding-bottom:5px;">
      <?php echo app('translator')->get('cash_register.payments_collected'); ?>
    </h4>
    <?php
      $has_any_payment = $register_details->total_sale > 0 || $register_details->total_advance_payment > 0 || $register_details->total_expense > 0;
    ?>
    <?php if($has_any_payment): ?>
    <table class="table table-condensed">
      <tr>
        <th><?php echo app('translator')->get('lang_v1.payment_method'); ?></th>
        <th><?php echo app('translator')->get('sale.sale'); ?></th>
        <th><?php echo app('translator')->get('cash_register.due_payments_collected'); ?></th>
        <th><?php echo app('translator')->get('lang_v1.expense'); ?></th>
      </tr>
      <?php if($register_details->total_cash > 0 || $register_details->total_cash_advance_payment > 0 || $register_details->total_cash_expense > 0): ?>
      <tr>
        <td><?php echo app('translator')->get('cash_register.cash_payment'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cash, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cash_advance_payment, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cash_expense, false); ?></span></td>
      </tr>
      <?php endif; ?>
      <?php if($register_details->total_cheque > 0 || $register_details->total_cheque_advance_payment > 0 || $register_details->total_cheque_expense > 0): ?>
      <tr>
        <td><?php echo app('translator')->get('cash_register.checque_payment'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cheque, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cheque_advance_payment, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cheque_expense, false); ?></span></td>
      </tr>
      <?php endif; ?>
      <?php if($register_details->total_card > 0 || $register_details->total_card_advance_payment > 0 || $register_details->total_card_expense > 0): ?>
      <tr>
        <td><?php echo app('translator')->get('cash_register.card_payment'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_card, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_card_advance_payment, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_card_expense, false); ?></span></td>
      </tr>
      <?php endif; ?>
      <?php if($register_details->total_bank_transfer > 0 || $register_details->total_bank_transfer_advance_payment > 0 || $register_details->total_bank_transfer_expense > 0): ?>
      <tr>
        <td><?php echo app('translator')->get('cash_register.bank_transfer'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_bank_transfer, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_bank_transfer_advance_payment, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_bank_transfer_expense, false); ?></span></td>
      </tr>
      <?php endif; ?>
      <?php if($register_details->total_advance > 0 || $register_details->total_advance_expense > 0): ?>
      <tr>
        <td><?php echo app('translator')->get('lang_v1.advance_payment'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_advance, false); ?></span></td>
        <td>--</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_advance_expense, false); ?></span></td>
      </tr>
      <?php endif; ?>
      <?php if(array_key_exists('custom_pay_1', $payment_types) && ($register_details->total_custom_pay_1 > 0 || $register_details->total_custom_pay_1_advance_payment > 0 || $register_details->total_custom_pay_1_expense > 0)): ?>
        <tr>
          <td><?php echo e($payment_types['custom_pay_1'], false); ?>:</td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_1, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_1_advance_payment, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_1_expense, false); ?></span></td>
        </tr>
      <?php endif; ?>
      <?php if(array_key_exists('custom_pay_2', $payment_types) && ($register_details->total_custom_pay_2 > 0 || $register_details->total_custom_pay_2_advance_payment > 0 || $register_details->total_custom_pay_2_expense > 0)): ?>
        <tr>
          <td><?php echo e($payment_types['custom_pay_2'], false); ?>:</td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_2, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_2_advance_payment, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_2_expense, false); ?></span></td>
        </tr>
      <?php endif; ?>
      <?php if(array_key_exists('custom_pay_3', $payment_types) && ($register_details->total_custom_pay_3 > 0 || $register_details->total_custom_pay_3_advance_payment > 0 || $register_details->total_custom_pay_3_expense > 0)): ?>
        <tr>
          <td><?php echo e($payment_types['custom_pay_3'], false); ?>:</td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_3, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_3_advance_payment, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_3_expense, false); ?></span></td>
        </tr>
      <?php endif; ?>
      <?php if(array_key_exists('custom_pay_4', $payment_types) && ($register_details->total_custom_pay_4 > 0 || $register_details->total_custom_pay_4_advance_payment > 0 || $register_details->total_custom_pay_4_expense > 0)): ?>
        <tr>
          <td><?php echo e($payment_types['custom_pay_4'], false); ?>:</td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_4, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_4_advance_payment, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_4_expense, false); ?></span></td>
        </tr>
      <?php endif; ?>
      <?php if(array_key_exists('custom_pay_5', $payment_types) && ($register_details->total_custom_pay_5 > 0 || $register_details->total_custom_pay_5_advance_payment > 0 || $register_details->total_custom_pay_5_expense > 0)): ?>
        <tr>
          <td><?php echo e($payment_types['custom_pay_5'], false); ?>:</td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_5, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_5_advance_payment, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_5_expense, false); ?></span></td>
        </tr>
      <?php endif; ?>
      <?php if(array_key_exists('custom_pay_6', $payment_types) && ($register_details->total_custom_pay_6 > 0 || $register_details->total_custom_pay_6_advance_payment > 0 || $register_details->total_custom_pay_6_expense > 0)): ?>
        <tr>
          <td><?php echo e($payment_types['custom_pay_6'], false); ?>:</td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_6, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_6_advance_payment, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_6_expense, false); ?></span></td>
        </tr>
      <?php endif; ?>
      <?php if(array_key_exists('custom_pay_7', $payment_types) && ($register_details->total_custom_pay_7 > 0 || $register_details->total_custom_pay_7_advance_payment > 0 || $register_details->total_custom_pay_7_expense > 0)): ?>
        <tr>
          <td><?php echo e($payment_types['custom_pay_7'], false); ?>:</td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_7, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_7_advance_payment, false); ?></span></td>
          <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_7_expense, false); ?></span></td>
        </tr>
      <?php endif; ?>
      <?php if($register_details->total_other > 0 || $register_details->total_other_advance_payment > 0 || $register_details->total_other_expense > 0): ?>
      <tr>
        <td><?php echo app('translator')->get('cash_register.other_payments'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_other, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_other_advance_payment, false); ?></span></td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_other_expense, false); ?></span></td>
      </tr>
      <?php endif; ?>
      
      <tr style="font-weight:bold; border-top:2px solid #333;">
        <td><b><?php echo app('translator')->get('receipt.total'); ?></b></td>
        <td class="success" style="border:1px solid #d6e9c6;">
          <b><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_sale, false); ?></span></b>
        </td>
        <td class="info" style="border:1px solid #bce8f1;">
          <b><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_advance_payment, false); ?></span></b>
        </td>
        <td class="danger" style="border:1px solid #ebccd1;">
          <b><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_expense, false); ?></span></b>
        </td>
      </tr>
      
      <tr class="success" style="font-weight:bold;">
        <td colspan="2"><b><?php echo app('translator')->get('cash_register.grand_total_collected'); ?>:</b></td>
        <td colspan="2">
          <b><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_sale + $register_details->total_advance_payment, false); ?></span></b>
        </td>
      </tr>
    </table>
    <?php else: ?>
    <p class="text-muted text-center"><?php echo app('translator')->get('lang_v1.no_data'); ?></p>
    <?php endif; ?>

    
    <?php if($register_details->total_refund > 0): ?>
    <table class="table table-condensed">
      <tr class="danger">
        <th><?php echo app('translator')->get('cash_register.total_refund'); ?></th>
        <td>
          <b><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_refund, false); ?></span></b><br>
          <small>
          <?php if($register_details->total_cash_refund != 0): ?>
            Cash: <span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cash_refund, false); ?></span><br>
          <?php endif; ?>
          <?php if($register_details->total_cheque_refund != 0): ?>
            Cheque: <span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_cheque_refund, false); ?></span><br>
          <?php endif; ?>
          <?php if($register_details->total_card_refund != 0): ?>
            Card: <span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_card_refund, false); ?></span><br>
          <?php endif; ?>
          <?php if($register_details->total_bank_transfer_refund != 0): ?>
            Bank Transfer: <span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_bank_transfer_refund, false); ?></span><br>
          <?php endif; ?>
          <?php if(array_key_exists('custom_pay_1', $payment_types) && $register_details->total_custom_pay_1_refund != 0): ?>
            <?php echo e($payment_types['custom_pay_1'], false); ?>: <span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_1_refund, false); ?></span><br>
          <?php endif; ?>
          <?php if(array_key_exists('custom_pay_2', $payment_types) && $register_details->total_custom_pay_2_refund != 0): ?>
            <?php echo e($payment_types['custom_pay_2'], false); ?>: <span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_2_refund, false); ?></span><br>
          <?php endif; ?>
          <?php if(array_key_exists('custom_pay_3', $payment_types) && $register_details->total_custom_pay_3_refund != 0): ?>
            <?php echo e($payment_types['custom_pay_3'], false); ?>: <span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_custom_pay_3_refund, false); ?></span><br>
          <?php endif; ?>
          <?php if($register_details->total_other_refund != 0): ?>
            Other: <span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_other_refund, false); ?></span>
          <?php endif; ?>
          </small>
        </td>
      </tr>
    </table>
    <?php endif; ?>

    <hr>

    
    <h4 style="margin-bottom:10px; font-weight:bold; border-bottom:2px solid #333; padding-bottom:5px;">
      <?php echo app('translator')->get('cash_register.outstanding_receivables'); ?>
    </h4>
    <table class="table table-condensed">
      <tr>
        <td><?php echo app('translator')->get('cash_register.gross_sales'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($details['transaction_details']->total_sales, false); ?></span></td>
      </tr>
      <tr>
        <td>(-) <?php echo app('translator')->get('cash_register.total_collected'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($register_details->total_sale, false); ?></span></td>
      </tr>
      <tr>
        <td>(-) <?php echo app('translator')->get('cash_register.due_applied_to_register'); ?>:</td>
        <td><span class="display_currency" data-currency_symbol="true"><?php echo e($due_applied_to_register ?? 0, false); ?></span></td>
      </tr>
      <tr class="warning" style="font-weight:bold;">
        <td><b><?php echo app('translator')->get('cash_register.pending_from_customers'); ?>:</b></td>
        <td>
          <b><span class="display_currency" data-currency_symbol="true"><?php echo e($details['transaction_details']->total_sales - $register_details->total_sale - ($due_applied_to_register ?? 0), false); ?></span></b>
        </td>
      </tr>
    </table>

  </div>
</div>

<?php echo $__env->make('cash_register.register_product_details', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH /home/luckyaut/pos.luckyauto.xyz/resources/views/cash_register/payment_details.blade.php ENDPATH**/ ?>