Вход Регистрация
Файл: src/storage/framework/views/75f4cdf5b24536c5be660feab4e71b7a63ea04a5.php
Строк: 474
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <meta name="description" content="">
      <meta name="author" content="">
      <title>CupInvoice - Invoice Management System v1.0</title>
      <!-- Bootstrap Core CSS -->
      <link rel="shortcut icon" href="<?php echo e(asset('img/favico.png')); ?>">
      <link href="<?php echo e(asset('css/bootstrap.min.css')); ?>" rel="stylesheet">
      <link href="<?php echo e(asset('css/style.css')); ?>" rel="stylesheet">
      <link href="<?php echo e(asset('plugins/linearicons/style.css')); ?>" rel="stylesheet">
      <link href="<?php echo e(asset('plugins/dropzone/dropzone.css')); ?>" rel="stylesheet">
      <link href="<?php echo e(asset('plugins/metrics-graphics/metricsgraphics.css')); ?>" rel="stylesheet">
      <link href='https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
      <link href="<?php echo e(asset('plugins/select2/css/select2.min.css')); ?>" rel="stylesheet" />
      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
      <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->
   </head>
   <body>
      <div class="wrapper">
         <div class="page-container">
            <aside>
               <div class="logo">
                      <a href="<?php echo e(route('get.dashboard')); ?>">
                 <img src="<?php echo e(asset('img/logo.png')); ?>" alt="iNvoices Panel" />
                    </a>
               </div>
               <div class="user-panel">
                  <div class="user-avatar">
                      <img src="http://www.gravatar.com/avatar/<?php echo e(md5($Auth->Email)); ?>" class="img-circle" />
                  </div>
                  <div class="user-name">
                     <div class="label-name"><?php echo e($Auth->Name.' '.$Auth->Surname); ?></div>
                     <div class="label-logout"> <a href="<?php echo e(route('get.logout')); ?>"> <i class="lnr lnr-exit"></i><?php echo e(trans('user.label_logout')); ?></a></div>
                  </div>
               </div>
               <div class="sidebar">
                  <ul class="navigation">
                     <li class="nav-heading"><?php echo e(trans('mainmenu.label_mainmenu')); ?></li>
                     <li class="<?php if(Request::route()->getName()=='get.dashboard'): ?> active <?php endif; ?>">
                      <a href="<?php echo e(route('get.dashboard')); ?>"><i class="lnr lnr-home"></i> <span class="nav-title"><?php echo e(trans('mainmenu.dashboard')); ?></span></a>
                    </li>
                     <li class="<?php if(Request::route()->getPrefix()=='/invoices'): ?> active <?php endif; ?>">
                        <a href="" class="sub-ul"><i class="lnr lnr-file-empty"></i> <span class="nav-title"><?php echo e(trans('mainmenu.invoices')); ?></span></a>
                        <ul class="sub-menu">
                           <li><a href="<?php echo e(route('invoices::list')); ?>"><?php echo e(trans('mainmenu.invoices_list')); ?></a></li>
                           <li><a href="<?php echo e(route('invoices::add')); ?>"><?php echo e(trans('mainmenu.create_invoice')); ?></a></li>
                        </ul>
                     </li>
                     <li class="<?php if(Request::route()->getPrefix()=='/companies'): ?> active <?php endif; ?>">
                        <a href="" class="sub-ul"><i class="lnr lnr-users"></i> <span class="nav-title"><?php echo e(trans('mainmenu.customers')); ?></span></a>
                        <ul class="sub-menu">
                           <li><a href="<?php echo e(route('companies::list')); ?>"><?php echo e(trans('mainmenu.customers_list')); ?></a></li>
                           <li><a href="<?php echo e(route('companies::add')); ?>"><?php echo e(trans('mainmenu.create_customer')); ?></a></li>
                        </ul>
                     </li>
                     <li class="<?php if(Request::route()->getPrefix()=='/products'): ?> active <?php endif; ?>">
                        <a href="" class="sub-ul"><i class="lnr lnr-cart"></i> <span class="nav-title"><?php echo e(trans('mainmenu.products')); ?></span></a>
                        <ul class="sub-menu">
                           <li><a href="<?php echo e(route('products::list')); ?>"><?php echo e(trans('mainmenu.products_list')); ?></a></li>
                           <li><a href="<?php echo e(route('products::add')); ?>"><?php echo e(trans('mainmenu.create_product')); ?></a></li>
                        </ul>
                     </li>
                     <li class="<?php if(Request::route()->getPrefix()=='/settings'): ?> active <?php endif; ?>">
                      <a href="<?php echo e(route('settings::view')); ?>"><i class="lnr lnr-cog"></i> <span class="nav-title"><?php echo e(trans('mainmenu.settings')); ?></span>
                      </a>
                    </li>
                  </ul>
               </div>
            </aside>
            <div class="page-content">
               <section class="breadcrumb-line">
                  <?php echo $__env->yieldContent("breadcrumb"); ?>
               </section>
               <section class="dashboard">
                  <?php echo $__env->yieldContent("content"); ?>
               </section>
               </div>
         </div>
      </div>
      <!-- jQuery Version 1.11.1 -->
      <script src="<?php echo e(asset('js/jquery-1.12.1.min.js')); ?>"></script>
      <!-- Bootstrap Core JavaScript -->
      <script src="<?php echo e(asset('js/bootstrap.min.js')); ?>"></script>
      <script src="<?php echo e(asset('js/filterize.js')); ?>"></script>
      <script src="<?php echo e(asset('plugins/select2/js/select2.min.js')); ?>"></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.0/d3.min.js' charset='utf-8'></script>
      <script src="<?php echo e(asset('plugins/metrics-graphics/metricsgraphics.min.js')); ?>"></script>
      <script src="<?php echo e(asset('plugins/pickadate/picker.js')); ?>"></script>
      <script src="<?php echo e(asset('plugins/pickadate/picker.date.js')); ?>"></script>
      <script src="<?php echo e(asset('plugins/pickadate/legacy.js')); ?>"></script>
      <script src="<?php echo e(asset('plugins/dropzone/dropzone.js')); ?>"></script>
      <script type="text/javascript">
        function guid() {
          return Math.random().toString().substring(2,10);
        }
        $(document).ready(function(){
          if ($('.refid').length) {
            $('.refid').val(guid());
          }
          if ($('.new-row').length) {
            $('.new-row').click(function(){          
              var x = $('table.items tr:last').clone(true);
              var item_id = parseInt(x.children("td.lastid").html());
              x.children("td.lastid").html(item_id+1)
              console.log(item_id);
              x.children("td").eq(1).children("select[name='ProductID["+(item_id-1)+"]']").attr("name","ProductID["+item_id+"]");
              x.children("td").eq(2).children("input[name='ProductPrice["+(item_id-1)+"]']").attr("name","ProductPrice["+item_id+"]").val(null);
              x.children("td").eq(3).children("input[name='ProductAmount["+(item_id-1)+"]']").attr("name","ProductAmount["+item_id+"]").val(null);
              x.children("td").eq(4).children("input[name='ProductDiscount["+(item_id-1)+"]']").attr("name","ProductDiscount["+item_id+"]").val(null);
              x.children("td").eq(5).children("input[name='ProductTax["+(item_id-1)+"]']").attr("name","ProductTax["+item_id+"]").val(null);
              console.log(x.html());
              /* Üsttekinin aynını diğer fieldler içinde yap!*/
              x.insertAfter('table.items tr:last');
            });
          }
          if ($('.datepicker').length) {
            var $input = $( '.datepicker' ).pickadate({
              selectMonths: false, // Creates a dropdown to control month
              selectYears: false, // Creates a dropdown of 15 years to control year
              format: 'yyyy-mm-dd',
            });
          }
          if ($('.dropzone').length) {
            Dropzone.autoDiscover = false;
            var myDropzone = new Dropzone(".dropzone", { 
              paramName:"Logo",
              url: "<?php echo e(route('upload')); ?>",
              success: function(File, Response){
                var Source = Response.Name;
                $('.img-responsive').attr("src","/uploads/"+Source+"?"+Math.random()).fadeIn(400);
              }
            });            
          }
          if ($('.select-clear').length) {
            $(".select-clear").select2({
              placeholder: "Select a state"
            });
          }

          if ($('.select2').length) {
            $('.select2').select2();
            
          }
          if ($('.sub-menu').length) {
            $('.sub-menu').hide();
            $('a.sub-ul').click(function(e){
                var statusOfMenu = $(this).siblings('.sub-menu').toggle().is(":visible");
                if (statusOfMenu) {
                    $(this).parent().addClass("active");
                }else{
                    $(this).parent().removeClass("active");
                }
                e.preventDefault();
            });

            $('li.active > .sub-ul').siblings(".sub-menu").show();
          }
            /* New Row */
            if ($('.random-ref').length) {
                    $('.random-ref').click(function(){
              $('.refid').val(guid());
            });      
            }

            var Invoice = {
              "Products": [],
              "TaxWage": 0.00,
              "TaxAmount": 0.00,
              "DiscountAmount": 0.00,
              "DiscountType": 0,
              "Subtotal":0.00,
              "Total": 0.00
            }
              $('[data-toggle="tooltip"]').tooltip(); 
            if ($('.discount-type').length) {
              $('.discount-type').click(function(e){
                if($(this).html()=="%"){
                  $('.discount-label').html($(this).html()+' <span class="caret"></span>');
                  $('.discount_type').attr("value",0);
                  $('.discount_type').attr("name","DiscountPercentage");
                  Invoice["DiscountType"] = 0;              
                }else{
                  $('.discount-label').html($(this).html()+' <span class="caret"></span>');
                  $('.discount_type').attr("value","Discount");    
                  Invoice["DiscountType"] = 1;              
                }
                calculateProduct("Price-0");
                e.preventDefault();
              });
            }
            $('input[name="DiscountWage"]').on('change',function(){
              if ($(this).val().length!=0) {
                Invoice["DiscountAmount"] = parseInt($(this).val());
              }else{
                Invoice["DiscountAmount"] = 0;               
              }
              updateTotals();
            })
            $('input[name="Tax"]').on('change',function(){
              if ($(this).val().length!=0) {
                Invoice["TaxWage"] = parseInt($(this).val())/100;
                $('.tax_percentage').html("("+$(this).val()+"%)");
              }else{
                Invoice["TaxWage"] = 0;
                $('.tax_percentage').html("");                
              }
                updateTotals();
            })
            function updateFields(){
                Invoice["Total"]= parseFloat(Math.round(Invoice["Total"] * 100) / 100).toFixed(2);
                $('.grand_total').html(Invoice["Total"]);
                $('.tax_wage').html(Invoice["TaxAmount"]);
                $('.sub_total').html(Invoice["Subtotal"]);
            }
            function updateSubtotal(){
              var Subtotal = 0.00;
              $('input[name^="ProductPrice" ]').each(function(index){
                var ProductPrice = parseInt($('input[name^="ProductPrice" ]').eq(index).val());
                var ProductAmount = parseInt($('input[name^="ProductAmount" ]').eq(index).val());
                var ProductTax = parseInt($('input[name^="ProductTax" ]').eq(index).val());
                var ProductDiscount= parseInt($('input[name^="ProductDiscount"]').eq(index).val());
                /*console.log("ProductPrice Value:",ProductPrice);
                console.log("ProductAmount Value:",ProductAmount);
                console.log("ProductTax Value:",ProductTax);
                console.log("ProductAmount Value:",ProductAmount);*/
                if (ProductPrice>0 && ProductAmount>0) {
                  Subtotal = Subtotal+(ProductPrice*ProductAmount);
                  if (ProductTax>0) {
                    Subtotal = Subtotal+(Subtotal*(ProductTax/100));
                  console.log("SubTotal Pure:"+Subtotal);
                  }
                  if (ProductDiscount>0) {
                    Subtotal = Subtotal-ProductDiscount;
                  }

                }
                Invoice["Subtotal"] = Subtotal.toFixed(2);
              });
            }
            function updateTotals(){
              updateSubtotal();
              Invoice["Total"]      = 0.00;
              Invoice["TaxAmount"]  = (Invoice["Subtotal"]*Invoice["TaxWage"]).toFixed(2);
              Invoice["Total"]      = Invoice["Subtotal"]+ (Invoice["Subtotal"]*Invoice["TaxWage"]);
              if (Invoice["DiscountType"] == 0) {
                Invoice["Total"]    = Invoice["Total"]-(Invoice["Total"]*(Invoice["DiscountAmount"]/100));
              }else{
                Invoice["Total"]    = Invoice["Total"]-Invoice["DiscountAmount"];
              }
              updateFields();
            }
            function calculateProduct(id){
              var price_value = parseInt($('#'+id).val());
              var discount_value = parseInt($('#'+id).val());
              var tax_value = parseInt($('#'+id).val());
              var product_amount = parseInt($('#'+id).val());
              if (!isNaN(product_amount) && !isNaN(price_value)) {
                updateTotals();
              }
            }
            $('.productprice,.productamount,.productdiscount,.producttax').on('change',function(){
              var index = $(this).attr("id");
              calculateProduct(index);
            })
            $('input[name="DiscountWage"]').each(function(){
              if ($(this).val().length!=0) {
                Invoice["DiscountAmount"] = parseInt($(this).val());
              }else{
                Invoice["DiscountAmount"] = 0;               
              }
              updateTotals();
            })
            $('input[name="Tax"]').each(function(){
              if ($(this).val().length!=0) {
                Invoice["TaxWage"] = parseInt($(this).val())/100;
                $('.tax_percentage').html("("+$(this).val()+"%)");
              }else{
                Invoice["TaxWage"] = 0;
                $('.tax_percentage').html("");                
              }
                updateTotals();
            })
            $('.productprice,.productamount,.productdiscount,.producttax').each(function(){
              var index = $(this).attr("id");
              calculateProduct(index);
            });
            
        });
    d3.json('<?php echo e(route("api::yearlychart")); ?>', function(data) {
              data = MG.convert.date(data, 'date');
              MG.data_graphic({
                  title: "Line Chart",
                  description: "This is a simple line chart. You can remove the area portion by adding area: false to the arguments list.",
                  data: data,
                  color: '#27ae60',
                  full_width: true,
                  height: 300,
                  target: document.getElementById('fake_users1'),
                  x_accessor: 'date',
                  y_accessor: 'value'
              });
          });
       </script>
   </body>
</html>
Онлайн: 1
Реклама