<link rel="stylesheet" href="http://tirthelectronics.in/NetBAS/base/css/bootstrap.min.css">
<style>
<style>
	b{
	   font-weight: bold;
	}
	td{
		padding:5px!important;
		font-size:10;
	}
	th{
		padding:5px!important;
		font-size:10;
		text-align:center;
	}
	.sno{
		width:30px;
	}
	.code{
		width:50px;
	}
	.model{
	}
	.qty{
		width:20px;
	}
	.discount{
	}
	.netvalue{
		width:50px;
	}
	.taxrate{
		width:85px;
	}
	.taxamount{
		width:85px;
	}
	.total{
		width:100px;
	}
	.amountcell{
		align:right;
	}
	</style>
</style>
<!-- business information here -->
<div class="table-responsive" style="min-height:700px!important;margin-top:150px">          
	<table class="table table-bordered">
    	<thead>
    	  <tr>
    		<td colspan="7" align="center">
    		    <?php if(!empty($receipt_details->invoice_heading)): ?>
        		    <?php echo $receipt_details->invoice_heading; ?>

        		<?php endif; ?>
    		</td>
    		<td colspan="3" align="center">
    		    GSTN No: 24ARBPM3236C1ZD
    		</td>
    	  </tr>
    	  <tr>
    		<td colspan="7">
    		    <p style="width: 100% !important" class="word-wrap">
        			<span class="pull-left text-left word-wrap">
        				<!-- customer info -->
        				<?php if(!empty($receipt_details->customer_info)): ?>
        					<b><?php echo e($receipt_details->customer_label, false); ?></b> <br> <?php echo $receipt_details->customer_info; ?> <br>
        				<?php endif; ?>
        				<?php if(!empty($receipt_details->client_id_label)): ?>
        					<br/>
        					<b><?php echo e($receipt_details->client_id_label, false); ?></b> <?php echo e($receipt_details->client_id, false); ?>

        				<?php endif; ?>
        				<?php if(!empty($receipt_details->customer_tax_number)): ?>
        					<b>GST No.: </b> <?php echo e($receipt_details->customer_tax_number, false); ?>

						<?php endif; ?>
        				<?php if(!empty($receipt_details->customer_custom_fields)): ?>
        					<br/><?php echo $receipt_details->customer_custom_fields; ?>

        				<?php endif; ?>
        				<?php if(!empty($receipt_details->sales_person_label)): ?>
        					<br/>
        					<b><?php echo e($receipt_details->sales_person_label, false); ?></b> <?php echo e($receipt_details->sales_person, false); ?>

        				<?php endif; ?>
        				<?php if(!empty($receipt_details->commission_agent_label)): ?>
        					<br/>
        					<strong><?php echo e($receipt_details->commission_agent_label, false); ?></strong> <?php echo e($receipt_details->commission_agent, false); ?>

        				<?php endif; ?>
        				<?php if(!empty($receipt_details->customer_rp_label)): ?>
        					<br/>
        					<strong><?php echo e($receipt_details->customer_rp_label, false); ?></strong> <?php echo e($receipt_details->customer_total_rp, false); ?>

        				<?php endif; ?>
        			</span>
        		</p>
    		</td>
    		<td colspan="3">
    			<p style="width: 100% !important" class="word-wrap">
        			<span class="">
        			    <?php if(!empty($receipt_details->invoice_no_prefix)): ?>
        					<b><?php echo $receipt_details->invoice_no_prefix; ?></b>
        				<?php endif; ?>
        				<?php echo e($receipt_details->invoice_no, false); ?>

        
        				<?php if(!empty($receipt_details->types_of_service)): ?>
        					<br/>
        					<span class="pull-left text-left">
        						<strong><?php echo $receipt_details->types_of_service_label; ?>:</strong>
        						<?php echo e($receipt_details->types_of_service, false); ?>

        						<!-- Waiter info -->
        						<?php if(!empty($receipt_details->types_of_service_custom_fields)): ?>
        							<?php $__currentLoopData = $receipt_details->types_of_service_custom_fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        								<br><strong><?php echo e($key, false); ?>: </strong> <?php echo e($value, false); ?>

        							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        						<?php endif; ?>
        					</span>
        				<?php endif; ?>
        
        				<!-- Table information-->
        		        <?php if(!empty($receipt_details->table_label) || !empty($receipt_details->table)): ?>
        		        	<br/>
        					<span class="pull-left text-left">
        						<?php if(!empty($receipt_details->table_label)): ?>
        							<b><?php echo $receipt_details->table_label; ?></b>
        						<?php endif; ?>
        						<?php echo e($receipt_details->table, false); ?>

        
        						<!-- Waiter info -->
        					</span>
        		        <?php endif; ?>
        		        </br>
        				<b><?php echo e($receipt_details->date_label, false); ?></b> <?php echo e($receipt_details->invoice_date, false); ?>

        
        				<?php if(!empty($receipt_details->due_date_label)): ?>
        				<br><b><?php echo e($receipt_details->due_date_label, false); ?></b> <?php echo e($receipt_details->due_date ?? '', false); ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->brand_label) || !empty($receipt_details->repair_brand)): ?>
        					<br>
        					<?php if(!empty($receipt_details->brand_label)): ?>
        						<b><?php echo $receipt_details->brand_label; ?></b>
        					<?php endif; ?>
        					<?php echo e($receipt_details->repair_brand, false); ?>

        		        <?php endif; ?>
        
        
        		        <?php if(!empty($receipt_details->device_label) || !empty($receipt_details->repair_device)): ?>
        					<br>
        					<?php if(!empty($receipt_details->device_label)): ?>
        						<b><?php echo $receipt_details->device_label; ?></b>
        					<?php endif; ?>
        					<?php echo e($receipt_details->repair_device, false); ?>

        		        <?php endif; ?>
        
        				<?php if(!empty($receipt_details->model_no_label) || !empty($receipt_details->repair_model_no)): ?>
        					<br>
        					<?php if(!empty($receipt_details->model_no_label)): ?>
        						<b><?php echo $receipt_details->model_no_label; ?></b>
        					<?php endif; ?>
        					<?php echo e($receipt_details->repair_model_no, false); ?>

        		        <?php endif; ?>
        
        				<?php if(!empty($receipt_details->serial_no_label) || !empty($receipt_details->repair_serial_no)): ?>
        					<br>
        					<?php if(!empty($receipt_details->serial_no_label)): ?>
        						<b><?php echo $receipt_details->serial_no_label; ?></b>
        					<?php endif; ?>
        					<?php echo e($receipt_details->repair_serial_no, false); ?><br>
        		        <?php endif; ?>
        				<?php if(!empty($receipt_details->repair_status_label) || !empty($receipt_details->repair_status)): ?>
        					<?php if(!empty($receipt_details->repair_status_label)): ?>
        						<b><?php echo $receipt_details->repair_status_label; ?></b>
        					<?php endif; ?>
        					<?php echo e($receipt_details->repair_status, false); ?><br>
        		        <?php endif; ?>
        		        
        		        <?php if(!empty($receipt_details->repair_warranty_label) || !empty($receipt_details->repair_warranty)): ?>
        					<?php if(!empty($receipt_details->repair_warranty_label)): ?>
        						<b><?php echo $receipt_details->repair_warranty_label; ?></b>
        					<?php endif; ?>
        					<?php echo e($receipt_details->repair_warranty, false); ?>

        					<br>
        		        <?php endif; ?>
        		        
        				<!-- Waiter info -->
        				<?php if(!empty($receipt_details->service_staff_label) || !empty($receipt_details->service_staff)): ?>
        		        	<br/>
        					<?php if(!empty($receipt_details->service_staff_label)): ?>
        						<b><?php echo $receipt_details->service_staff_label; ?></b>
        					<?php endif; ?>
        					<?php echo e($receipt_details->service_staff, false); ?>

        		        <?php endif; ?>
        		        <?php if(!empty($receipt_details->shipping_custom_field_1_label)): ?>
        					<br><strong><?php echo $receipt_details->shipping_custom_field_1_label; ?> :</strong> <?php echo $receipt_details->shipping_custom_field_1_value ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->shipping_custom_field_2_label)): ?>
        					<br><strong><?php echo $receipt_details->shipping_custom_field_2_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_2_value ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->shipping_custom_field_3_label)): ?>
        					<br><strong><?php echo $receipt_details->shipping_custom_field_3_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_3_value ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->shipping_custom_field_4_label)): ?>
        					<br><strong><?php echo $receipt_details->shipping_custom_field_4_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_4_value ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->shipping_custom_field_5_label)): ?>
        					<br><strong><?php echo $receipt_details->shipping_custom_field_2_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_5_value ?? ''; ?>

        				<?php endif; ?>
        				
        				<?php if(!empty($receipt_details->sale_orders_invoice_no)): ?>
        					<br>
        					<strong><?php echo app('translator')->get('restaurant.order_no'); ?>:</strong> <?php echo $receipt_details->sale_orders_invoice_no ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->sale_orders_invoice_date)): ?>
        					<br>
        					<strong><?php echo app('translator')->get('lang_v1.order_dates'); ?>:</strong> <?php echo $receipt_details->sale_orders_invoice_date ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->sell_custom_field_1_value)): ?>
        					<br>
        					<strong><?php echo e($receipt_details->sell_custom_field_1_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_1_value ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->sell_custom_field_2_value)): ?>
        					<br>
        					<strong><?php echo e($receipt_details->sell_custom_field_2_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_2_value ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->sell_custom_field_3_value)): ?>
        					<br>
        					<strong><?php echo e($receipt_details->sell_custom_field_3_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_3_value ?? ''; ?>

        				<?php endif; ?>
        
        				<?php if(!empty($receipt_details->sell_custom_field_4_value)): ?>
        					<br>
        					<strong><?php echo e($receipt_details->sell_custom_field_4_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_4_value ?? ''; ?>

        				<?php endif; ?>
        
        			</span>
        		</p>
    		</td>
    	  </tr>
    	  <tr>
    		<th rowspan="2" class="sno">S. No.</th>
    		<th rowspan="2" class="code">Code<br><small>HSN / SAC </small></th>
    		<th rowspan="2" class="model">Model No.</th>
    		<th rowspan="2" class="qty">Qty</th>
    		<th rowspan="2" class="unit">Unit</th>
    		<th rowspan="2" class="discount">Dis.</th>
    		<th rowspan="2" class="netvalue">Net Value</th>
    		<th colspan="2" class="tax">Tax</th>
    		<th rowspan="2" class="total">Total Value</th>
    	  </tr>
    	  <tr>
    		<th class="taxrate">Rate</th>
    		<th class="taxamount">Amount</th>
    	  </tr>
    	  <?php
    	    $sr = 1;
    	  ?>
        </thead>
        <tbody>
			<?php $__empty_1 = true; $__currentLoopData = $receipt_details->lines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $line): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
				<tr>
				    <td><?php echo e($sr++, false); ?></td>
				    <td><?php echo e($line['hsn_sac'], false); ?></td>
					<td>
						<?php if(!empty($line['image'])): ?>
							<img src="<?php echo e($line['image'], false); ?>" alt="Image" width="50" style="float: left; margin-right: 8px;">
						<?php endif; ?>
                        <?php echo e($line['name'], false); ?> <?php echo e($line['product_variation'], false); ?> <?php echo e($line['variation'], false); ?> 
						<?php if(!empty($line['product_custom_fields'])): ?>, <?php echo e($line['product_custom_fields'], false); ?> <?php endif; ?>
                        <?php if(!empty($line['product_description'])): ?>
                        	<small>
                        		<?php echo $line['product_description']; ?>

                        	</small>
                        <?php endif; ?> 
                        <?php if(!empty($line['sell_line_note'])): ?>
                        <br>
                        <small>
                        	<?php echo $line['sell_line_note']; ?>

                        </small>
                        <?php endif; ?> 
						<?php if(isset($line['uids']) && count($line['uids'])): ?>
							<?php $__currentLoopData = $line['uids']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $uid): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<?php echo e($uid['uid'], false); ?><br>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
						<?php endif; ?>
                        <?php if(!empty($line['lot_number'])): ?><br> <?php echo e($line['lot_number_label'], false); ?>:  <?php echo e($line['lot_number'], false); ?> <?php endif; ?> 
                        <?php if(!empty($line['product_expiry'])): ?>, <?php echo e($line['product_expiry_label'], false); ?>:  <?php echo e($line['product_expiry'], false); ?> <?php endif; ?>

                        <?php if(!empty($line['warranty_name'])): ?> <br><small><?php echo e($line['warranty_name'], false); ?> </small><?php endif; ?> <?php if(!empty($line['warranty_exp_date'])): ?> <small>- <?php echo e(\Carbon::createFromTimestamp(strtotime($line['warranty_exp_date']))->format(session('business.date_format')), false); ?> </small><?php endif; ?>
                        <?php if(!empty($line['warranty_description'])): ?> <small> <?php echo e($line['warranty_description'] ?? '', false); ?></small><?php endif; ?>

                        <?php if($receipt_details->show_base_unit_details && $line['quantity'] && $line['base_unit_multiplier'] !== 1): ?>
                        <br><small>
                        	1 <?php echo e($line['units'], false); ?> = <?php echo e($line['base_unit_multiplier'], false); ?> <?php echo e($line['base_unit_name'], false); ?> <br>
                        	<?php echo e($line['base_unit_price'], false); ?> x <?php echo e($line['orig_quantity'], false); ?> = <?php echo e($line['line_total'], false); ?>

                        </small>
                        <?php endif; ?>
                    </td>
					<td class="text-right">
						<?php echo e($line['quantity'], false); ?> <?php echo e($line['units'], false); ?> 

						<?php if($receipt_details->show_base_unit_details && $line['quantity'] && $line['base_unit_multiplier'] !== 1): ?>
                        <br><small>
                        	<?php echo e($line['quantity'], false); ?> x <?php echo e($line['base_unit_multiplier'], false); ?> = <?php echo e($line['orig_quantity'], false); ?> <?php echo e($line['base_unit_name'], false); ?>

                        </small>
                        <?php endif; ?>
					</td>
					<td class="text-right"><?php echo e($line['unit_price_before_discount'], false); ?></td>
					<?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
						<td class="text-right">
							<?php echo e($line['unit_price_inc_tax'], false); ?> 
						</td>
					<?php endif; ?>
					<?php if(!empty($receipt_details->item_discount_label)): ?>
						<td class="text-right">
							<?php echo e($line['total_line_discount'] ?? '0.00', false); ?>


							<?php if(!empty($line['line_discount_percent'])): ?>
							 	(<?php echo e($line['line_discount_percent'], false); ?>%)
							<?php endif; ?>
						</td>
					<?php endif; ?>
					<td class="text-right">
						<?php echo e($line['line_discount'], false); ?>

					</td>
					<td class="text-right">
						<?php echo e($line['line_total_exc_tax'], false); ?>

					</td>
					<td class="text-right">
						<?php $__currentLoopData = $line['group_tax_details']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tx): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
							<?php echo e($tx['name'], false); ?>

						<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
					</td>
					<td>
						<?php $__currentLoopData = $line['group_tax_details']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tx): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
							<?php echo e(number_format($tx['calculated_tax'],2), false); ?>

						<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
					</td>

					<td>
						<?php echo e($line['line_total'], false); ?>

					</td>
				</tr>
				<?php if(!empty($line['modifiers'])): ?>
					<?php $__currentLoopData = $line['modifiers']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $modifier): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
						<tr>
							<td>
	                            <?php echo e($modifier['name'], false); ?> <?php echo e($modifier['variation'], false); ?> 
	                            <?php if(!empty($modifier['sub_sku'])): ?>, <?php echo e($modifier['sub_sku'], false); ?> <?php endif; ?> <?php if(!empty($modifier['cat_code'])): ?>, <?php echo e($modifier['cat_code'], false); ?><?php endif; ?>
	                            <?php if(!empty($modifier['sell_line_note'])): ?>(<?php echo $modifier['sell_line_note']; ?>) <?php endif; ?> 
	                        </td>
							<td class="text-right"><?php echo e($modifier['quantity'], false); ?> <?php echo e($modifier['units'], false); ?> </td>
							<td class="text-right"><?php echo e($modifier['unit_price_inc_tax'], false); ?></td>
							<?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
								<td class="text-right"><?php echo e($modifier['unit_price_exc_tax'], false); ?></td>
							<?php endif; ?>
							<?php if(!empty($receipt_details->item_discount_label)): ?>
								<td class="text-right">0.00</td>
							<?php endif; ?>
							<td class="text-right"><?php echo e($modifier['line_total'], false); ?></td>
						</tr>
					<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
				<?php endif; ?>
			<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
				<tr>
					<td colspan="4">&nbsp;</td>
					<?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
					<td></td>
					<?php endif; ?>
					<?php if(!empty($receipt_details->item_discount_label)): ?>
					<td></td>
					<?php endif; ?>
				</tr>
			<?php endif; ?>

			<tr>
				<td colspan="6"><strong>Total</strong></td>
				<td><strong><?php echo e($receipt_details->subtotal_exc_tax_unformatted, false); ?></strong></td>
				<td colspan="2"><strong><?php echo e($receipt_details->tax_uf, false); ?></strong></td>
				<td><strong><?php echo e($receipt_details->total_uf, false); ?></strong></td>
			</tr>

			<tr>
				<td colspan="7">
					<strong>Amount In Words</strong>
					<br /> <?php echo e(convertNumberToWords($receipt_details->total_unformatted), false); ?>

				</td>
				<td colspan="2">
					<span>Rounding Off</span> <br />
					<span>Total Payable Amount</span>
				</td>
				<td>
					<span><?php echo e(number_format($receipt_details->round_off_amount,2), false); ?></span><br />
					<span><?php echo e(number_format($receipt_details->total_unformatted,2), false); ?></span>
				</td>
			</tr>
			<tr>
				<td colspan="10">
					<?php echo $receipt_details->footer_text; ?>
				</td>
			</tr>

		</tbody>
    </table>
</div><?php /**PATH C:\xampp\htdocs\netbas\resources\views/sale_pos/receipts/classic.blade.php ENDPATH**/ ?>