Advertisement
freddy0512

html2pdf

Apr 10th, 2015
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 9.98 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <style="text/css">
  4.             .kiri
  5.             {
  6.                 height:100px;
  7.                 width:300px;
  8.             }
  9.             .kiri h1
  10.             {
  11.                 margin-top: -10px;
  12.                 font-size: 32px;
  13.                 font-family:Arial;
  14.             }
  15.             .kiri p
  16.             {
  17.                 margin-top:-10px;
  18.                 margin-left:5px;
  19.                 font-size: 15px;
  20.             }
  21.             #kanan
  22.             {
  23.                 float:right;
  24.             }
  25.             p.pembeli {
  26.     text-align: left;
  27.    
  28. }
  29.  
  30. p.hormatkami
  31. {
  32.  text-align: right;
  33. }
  34.  
  35.  
  36.  
  37.         </style>
  38.  
  39.     </head>
  40.  
  41.     <body>
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. <!kiri means left --->
  52.         <div class="kiri">
  53.                 <h1> CiptaJaya ComCell</h1>
  54.                 <p>Lampung Smartphones Center
  55.                 <br>
  56.             0813 2743 2888</p>
  57.         </div>
  58.  
  59. <!---To be honest i want make 2 div in the right and left too, how can i do that --->
  60.            
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. <!--and this how can i divide to be 2 right and left --->
  69.  
  70.  
  71. <h3>Data Pembelian</h3>
  72. <table class="tablekiri">
  73.     <?php  foreach($pembelian->result() as $detail){ ?>
  74.    
  75.  
  76.     <tr >
  77.         <td> No</td>
  78.         <td> :</td>
  79.         <td  width="150px"> <?php echo $detail->id_pembelian; ?></td>
  80.     </tr>
  81.     <tr>
  82.         <td> Suplier </td>
  83.         <td> :</td>
  84.         <td> <?php echo $detail->nama; ?></td>
  85.     </tr>
  86.     <tr>
  87.         <td> Tgl </td>
  88.         <td> :</td>
  89.         <td> <?php echo tgl_indo($detail->tgl_pembelian); ?></td>
  90.     </tr>
  91.     <tr>
  92.         <td> Pembayaran </td>
  93.         <td> :</td>
  94.         <td> <?php echo ($detail->status); ?> (<?php echo tgl_indo($detail->tgl);?>)</td>
  95.     </tr>
  96.  
  97. <tr>
  98.         <td> Refrensi </td>
  99.         <td> :</td>
  100.         <td> <?php echo $detail->refrensi; ?></td>
  101.     </tr>
  102. <?php  }  ?>
  103.  
  104. </table>
  105.  
  106.  
  107.  
  108. <h1> Data Barang</h1>
  109.  
  110.  
  111.  
  112. <table >
  113.                    
  114.                         <tr bgcolor="#E6E6FA">
  115.                             <th  >No</th>
  116.                             <th width="150" >Kode Barang</th>
  117.                             <th width="200">Nama Barang</th>
  118.                             <th width="70">Stock</th>
  119.                             <th width="100" >Harga</th>
  120.                             <th width="100"> Jumlah</th>
  121.                             <th width="70">Total</th>
  122.                         </tr>
  123.                    
  124.  
  125.  
  126. <?php
  127. $numberOfRow = 1;
  128. foreach ($barang->result() as $row) {  ?>
  129.                        
  130.                         <tr>
  131.                             <td><?php echo $numberOfRow ?></td>
  132.                             <td><?=$row->id_barang ?></td>
  133.                             <td><?=$row->nama_barang ?></td>
  134.                             <td><?=$row->jumlah_all ?></td>
  135.                             <td><?php echo "Rp.".number_format($row->harga_satuan,0,',','.'); ?></td>
  136.                             <td><?=$row->jumlah_item ?></td>
  137.                             <td><?php echo "Rp.".number_format($row->jumlah_bayar,0,',','.'); ?>
  138. </td>
  139.                         </tr>
  140.  
  141.  
  142.  
  143. <?php
  144. $numberOfRow++;
  145. }  ?>
  146. </table>
  147.  
  148.  
  149.  
  150.  
  151.     </body>
  152.  
  153.  
  154. </html>
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165. <!--<!DOCTYPE html>
  166. <html lang="en">
  167.  <head>
  168.   <title>Cipta   Jaya ComCell</title>
  169.    <link href="<?php echo base_url()?>asset/css/scroller_roll.css" rel="stylesheet" type="text/css"></link>
  170.    
  171.        
  172.         <link href="<?php echo base_url()?>asset/css/bootstrap.min.css" rel="stylesheet" media="screen">
  173.         <link href="<?php echo base_url()?>asset/css/style.css" rel="stylesheet" media="screen">
  174.     <link href="<?php echo base_url()?>asset/css/costum/flexslider.css" rel="stylesheet" media="screen">
  175.  </head>
  176.  
  177. <body>
  178. <div class="container">
  179.  
  180.  
  181.  
  182. <div class="row clearfix header">
  183.  <div class="col-md-6 pull-left kiri">
  184.    <h3>CiptaJaya ComCell</h3>
  185.    <h4>Lampung Smartphones Center</h4>
  186.    <h5>0813 2743 2888</h5>
  187.  </div>
  188.  
  189.  <div class="col-md-6 pull-right">
  190.  
  191.   <form class="form-inline">
  192.  <div class="form-group">
  193.    <label class="sr-only" for="exampleInputEmail3">Email address</label>
  194.    <input type="email" class="form-control" id="exampleInputEmail3" placeholder="Enter email">
  195.  
  196.  </div>
  197.  <div class="form-group">
  198.    <label class="sr-only" for="exampleInputPassword3">Password</label>
  199.    <input type="password" class="form-control" id="exampleInputPassword3" placeholder="Password">
  200.  
  201.  </div>
  202.  
  203.  <button type="submit" class="btn btn-default">Sign in</button>
  204. </form>
  205.  
  206.  
  207.    
  208.  </div>
  209. </div>
  210.  
  211.  
  212.  
  213. <div class="row clearfix">
  214. <h1 class="text-center">Tambah Pembelian</h1>
  215.  
  216.  
  217.  
  218.  
  219. <form class="form-horizontal" role="form" action="<?php echo base_url()?>admin/pembelian/updateProductDb" method="post" >
  220.  
  221. <?php  foreach($pembelian->result() as $detail){ ?>
  222. <div class="form-group">
  223.      <label for="lastname" class="col-sm-1 control-label pull-left">Kode </label>
  224.      <div class="col-sm-3">
  225.      
  226.             <input type="text" class="form-control"  name="kode_pembelian" id="kode_pembelian"  value="<?php echo $detail->id_pembelian; ?>"  readonly  >
  227.         </div>
  228.      
  229.        <label for="lastname" class="col-sm-5 control-label pull-left">
  230.         Tanggal Bayar
  231.         </label>
  232.      <div class="col-sm-3">
  233.              <input type="text" class="form-control"  name="tanggal_bayar" required="" id="tanggal" value="<?php echo $detail->tgl_pembelian; ?>"  >
  234.         </div>        
  235.  
  236. </div>
  237.  
  238.  
  239.  
  240.  
  241. <div class="form-group">
  242.      <label for="lastname" class="col-sm-1 control-label"> Suplier </label>
  243.      <div class="col-sm-3">
  244.             <input type="text" class="form-control"  name="kode_suplier" required="" id="kode_suplier"  value="<?php echo $detail->id_suplier; ?>" >
  245. </div>
  246.      
  247.        <label for="lastname" class="col-sm-5 control-label">Pembayaran </label>
  248.      <div class="col-sm-3">
  249.             <label class="radio-inline"><input type="radio" name="status" value="Cash"  required=""    <?php echo set_radio('myradio', 'Cash', ($detail->status == "Cash") ? TRUE : FALSE ); ?>>Cash</label>
  250.             <label class="radio-inline"><input type="radio" name="status" value="Berjangka"  required=""  <?php echo set_radio('myradio', 'Berjangka', ($detail->status == "Berjangka") ? TRUE : FALSE ); ?>  >Berjangka</label>
  251.      
  252.     </div>        
  253.  
  254. </div>
  255.  
  256.  
  257.  
  258. <div class="form-group">
  259.      <label for="lastname" class="col-sm-1 control-label">    Tanggal  </label>
  260.      <div class="col-sm-3">
  261.             <input type="text" class="form-control"  name="tanggal" required="" id="date" value="<?php echo $detail->tgl; ?>" >
  262.     </div>
  263.      
  264.        <label for="lastname" class="col-sm-5 control-label">Refrensi</label>
  265.      <div class="col-sm-3">
  266.              <input type="text" class="form-control"  name="refrensi" required="" value="<?php echo $detail->refrensi; ?>">
  267.    
  268.     </div>        
  269.  
  270. </div>
  271.  
  272. <?php  }  ?>   
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293. <table class="table table-bordered table-hover">
  294.                     <thead>
  295.                         <tr>
  296.                             <th width="2%"><input id="check_all" class="formcontrol" type="checkbox"/></th>
  297.                             <th width="12%">Kode Barang</th>
  298.                             <th width="15%">Nama Barang</th>
  299.                             <th width="8%">Stock</th>
  300.                             <th width="15%">Harga</th>
  301.                             <th width="10%"> Jumlah</th>
  302.                             <th width="15%">Total</th>
  303.                         </tr>
  304.                     </thead>
  305.                     <tbody>
  306.  
  307.  
  308. <?php
  309. $numberOfRow = 1;
  310. foreach ($barang->result() as $row) {  ?>
  311.                        
  312.                         <tr>
  313.                             <td><input class="case" type="checkbox" data-id="<?php echo $row->id_pembelian_child?>"/></td>
  314.                             <td>
  315.                             <input type="text" data-type="id_barang" name="itemNo[]" id="itemNo_<?php echo $numberOfRow?>" class="form-control autocomplete_txt" autocomplete="off" value="<?=$row->id_barang ?>">
  316.                             <input type="hidden"  name="kode[]" id="kode_<?php echo $numberOfRow?>" value="<?=$row->id_pembelian_child ?>">
  317.                             </td>
  318.                             <td><input type="text" data-type="nama_barang" name="itemName[]" id="itemName_<?php echo $numberOfRow?>" class="form-control autocomplete_txt" autocomplete="off" readonly value="<?=$row->nama_barang ?>"></td>
  319.                             <td><input type="text"  name="quantity1[]" id="quantity1_<?php echo $numberOfRow?>" class="form-control autocomplete_txt stock" autocomplete="off" readonly value="<?=$row->jumlah_all ?>"></td>
  320.                             <td><input type="number" name="price[]" id="price_<?php echo $numberOfRow?>" class="form-control changesNo" autocomplete="off" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;" pattern="^\d+(\.|\,)\d{2}$" value="<?=$row->harga_satuan ?>"></td>
  321.                             <td><input type="number" name="quantity[]" id="quantity_<?php echo $numberOfRow?>" class="form-control changesNo quantity" autocomplete="off" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;"  value="<?=$row->jumlah_item ?>"  ></td>
  322.                             <td><input type="number" name="total[]" id="total_<?php echo $numberOfRow?>" class="form-control totalLinePrice" autocomplete="off" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;" readonly  pattern="^\d+(\.|\,)\d{2}$" value="<?=$row->jumlah_bayar ?>"></td>
  323.                         </tr>
  324.  
  325.  
  326.  
  327. <?php
  328. $numberOfRow++;
  329. }  ?>
  330. </tbody>
  331.                 </table>
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362. <div class='row'>
  363.            
  364.            
  365.            
  366.             <div class='col-xs-12 col-sm-offset-4 col-md-offset-4 col-lg-offset-4 col-sm-3 col-md-3 col-lg-3'>
  367.                 <form class="form-inline">
  368.                    
  369.                     <?php foreach ($diskon->result() as $row) {  ?>
  370.                    
  371.                     <div class="form-group">
  372.                         <label>Total: &nbsp;</label>
  373.                         <div class="input-group">
  374.                             <div class="input-group-addon">IDR</div>
  375.                             <input type="number" class="form-control" id="totalAftertax" placeholder="Total" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;" name="total_price" value="<?=$row->total_bayar ?>">
  376.                         </div>
  377.                     </div>
  378.                     <div class="form-group">
  379.                         <label>Rabat: &nbsp;</label>
  380.                         <div class="input-group">
  381.                             <div class="input-group-addon">IDR</div>
  382.                             <input type="number" class="form-control" id="amountPaid" placeholder="Rabat" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;" name="rabat" value="<?=$row->rabat ?>" >
  383.                         </div>
  384.                     </div>
  385.                     <div class="form-group">
  386.                         <label>Harga Bersih: &nbsp;</label>
  387.                         <div class="input-group">
  388.                             <div class="input-group-addon">IDR</div>
  389.                             <input type="number" class="form-control amountDue" id="amountDue" placeholder="Harga Bersih" onKeyPress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;"  name="bersih" value="<?=$row->bayar_bersih ?>">
  390.                         </div>
  391.                     </div>
  392.  
  393.                     <?php  }  ?>
  394.                 </form>
  395.  
  396.  
  397.             </div>
  398.         </div>
  399.        
  400. </div>
  401. </form>
  402.  
  403. </div>
  404. </div>
  405.     <script src="<?php echo base_url();?>asset/js/auto_product_edit.js"></script>
  406.  
  407.  </body>
  408. </html>--->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement