SHOW:
|
|
- or go back to the newest paste.
| 1 | - | ?php |
| 1 | + | |
| 2 | $id_import_bl = $_GET['id_import_bl']; | |
| 3 | $query = mysqli_query($conn, "SELECT * from import_bl where id_import_bl='$id_import_bl'"); | |
| 4 | $dataku = mysqli_fetch_array($query); | |
| 5 | $tgl_bl = $dataku['tgl_bl']; | |
| 6 | $ori_tgl_bl = date("d-m-Y", strtotime($tgl_bl));
| |
| 7 | $tgl_bl = str_replace('-', '/', $ori_tgl_bl);
| |
| 8 | $tgl_invoice = $dataku['tgl_invoice']; | |
| 9 | $ori_tgl_invoice = date("d-m-Y", strtotime($tgl_invoice));
| |
| 10 | $tgl_invoice = str_replace('-', '/', $ori_tgl_invoice);
| |
| 11 | $etd_tgl = $dataku['etd_tgl']; | |
| 12 | $ori_etd_tgl = date("d-m-Y", strtotime($etd_tgl));
| |
| 13 | $etd_tgl = str_replace('-', '/', $ori_etd_tgl);
| |
| 14 | $eta_tgl = $dataku['eta_tgl']; | |
| 15 | $ori_eta_tgl = date("d-m-Y", strtotime($eta_tgl));
| |
| 16 | $eta_tgl = str_replace('-', '/', $ori_eta_tgl);
| |
| 17 | $ata_tgl = $dataku['ata_tgl']; | |
| 18 | $ori_ata_tgl = date("d-m-Y", strtotime($ata_tgl));
| |
| 19 | $ata_tgl = str_replace('-', '/', $ori_ata_tgl);
| |
| 20 | ?> | |
| 21 | ||
| 22 | <?php | |
| 23 | ||
| 24 | $query = mysqli_query($conn, "SELECT * FROM berita_acara ORDER BY id_ba DESC LIMIT 1"); | |
| 25 | $dataku = mysqli_fetch_array($query); | |
| 26 | $ex = explode('/', $dataku['no_surat']);
| |
| 27 | ||
| 28 | if (date('d-m')=='01-01')
| |
| 29 | {
| |
| 30 | $a = str_pad($ex[1]+1, 3, 0, STR_PAD_LEFT); | |
| 31 | } | |
| 32 | else | |
| 33 | {
| |
| 34 | $a = str_pad($ex[1]+1, 3, 0, STR_PAD_LEFT); | |
| 35 | } | |
| 36 | ||
| 37 | $b = 'IMEX'; | |
| 38 | $i = 'BA'; | |
| 39 | $e = 35100; | |
| 40 | $c = array('','I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII');
| |
| 41 | $d = date('Y');
| |
| 42 | $no_surat = $i.' / '.$a.' / '.$e.' / '.$b.' / '.$c[date('n')].' / '.$d;
| |
| 43 | ?> | |
| 44 | ||
| 45 | ||
| 46 | ||
| 47 | <div class="content-wrapper"> | |
| 48 | <div class="container-fluid"> | |
| 49 | <!-- Breadcrumbs--> | |
| 50 | <ol class="breadcrumb"> | |
| 51 | <li class="breadcrumb-item"> | |
| 52 | <a href="index.php">Dashboard</a> | |
| 53 | </li> | |
| 54 | <li class="breadcrumb-item active">Add Data Berita Acara</li> | |
| 55 | </ol> | |
| 56 | <div class="card"> | |
| 57 | <div class="card-body"> | |
| 58 | <form class="form-horizontal" action="form_ba.php" method="post" role="form"> | |
| 59 | <input type="hidden" name="id_import_bl" value="<?php echo $id_import_bl; ?>" class="form-control" required> | |
| 60 | <h5 class="card-title">BERDASARKAN</h5> | |
| 61 | <table cellpadding="3" cellspacing="0"> | |
| 62 | <tr> | |
| 63 | <td width="250px">Nomor Surat</td> | |
| 64 | <td colspan="3" width="750px"> | |
| 65 | <input type="text" name="no_surat" id="no_surat" value="<?php echo $no_surat; ?>" required class="form-control form-control-sm"> | |
| 66 | </td> | |
| 67 | </tr> | |
| 68 | <tr> | |
| 69 | <td width="250px">Nomor PIB</td> | |
| 70 | <td colspan="3" width="750"> | |
| 71 | <input type="text" name="no_pib" id="no_pib" value="<?php echo $dataku['no_pib']; ?>" required class="form-control form-control-sm"> | |
| 72 | </td> | |
| 73 | </tr> | |
| 74 | <tr> | |
| 75 | <td width="250px">Nama Perusahaan Asuransi</td> | |
| 76 | <td width="250px"> | |
| 77 | <input type="text" name="nama_prshn_asr" id="nama_prshn_asr" value="" required class="form-control form-control-sm"> | |
| 78 | </td> | |
| 79 | <td width="250px">Nama Pihak Asuransi</td> | |
| 80 | <td width="250px"> | |
| 81 | <input type="text" name="nama_asuransi" id="nama_asuransi" value="" required class="form-control form-control-sm"> | |
| 82 | </td> | |
| 83 | </tr> | |
| 84 | <tr> | |
| 85 | <td width="250px">Nama Perusahaan</td> | |
| 86 | <td width="250px"> | |
| 87 | <input type="text" name="nama_prshn_terima" id="nama_prshn_terima" required class="form-control form-control-sm" value="<?php echo $dataku ['nama_prshn_terima']; ?>"> | |
| 88 | </td> | |
| 89 | <td width="250px">Nama</td> | |
| 90 | <td width="250px"> | |
| 91 | <input type="text" name="nama_terima_kuasa" id="nama_terima_kuasa" required class="form-control form-control-sm" value="<?php echo $dataku ['nama_terima_kuasa']; ?>"> | |
| 92 | </td> | |
| 93 | </tr> | |
| 94 | <tr> | |
| 95 | <td width="250px">No P.O</td> | |
| 96 | <td width="250px"> | |
| 97 | - | <input type="text" name="pc_po" id="pc_po" value="<?php echo $dataku['pc_po']; ?>" required class="form-control form-control-sm"> |
| 97 | + | <input type="text" name="pc_po" id="pc_po" |
| 98 | value="<?php echo isset($dataku['pc_po'])?$dataku['pc_po']:NULL; ?>" | |
| 99 | required class="form-control form-control-sm"> | |
| 100 | </td> | |
| 101 | <td width="250px">Jumlah/Party/berat</td> | |
| 102 | <td width="250px"> | |
| 103 | <input type="text" name="jumlah" id="jumlah" value="<?php echo $dataku['jumlah']; ?>" required class="form-control form-control-sm"> | |
| 104 | </td> | |
| 105 | </tr> | |
| 106 | <tr> | |
| 107 | <td width="250px">No Proyek</td> | |
| 108 | <td width="250px"> | |
| 109 | <input type="text" name="no_proyek" id="no_proyek" value="<?php echo $dataku['no_proyek']; ?>" required class="form-control form-control-sm"> | |
| 110 | </td> | |
| 111 | <td width="250px">Nama Barang</td> | |
| 112 | <td width="250px"> | |
| 113 | <input type="text" name="nama_brg" id="nama_brg" value="<?php echo $dataku['nama_brg']; ?>" required class="form-control form-control-sm"> | |
| 114 | </td> | |
| 115 | </tr> | |
| 116 | <tr> | |
| 117 | <td width="250px">Nama Proyek</td> | |
| 118 | <td width="250px"> | |
| 119 | <input type="text" name="nama_proyek" id="nama_proyek" value="" required class="form-control form-control-sm"> | |
| 120 | </td> | |
| 121 | <td width="250px">Lokasi Barang</td> | |
| 122 | <td width="250px"> | |
| 123 | <input type="text" name="lokasi_brg" id="lokasi_brg" value="" required class="form-control form-control-sm"> | |
| 124 | </td> | |
| 125 | </tr> | |
| 126 | <tr> | |
| 127 | <td width="250px">No. L/C</td> | |
| 128 | <td width="250px"> | |
| 129 | <input type="text" name="no_lc" id="no_lc" value="" required class="form-control form-control-sm"> | |
| 130 | </td> | |
| 131 | <td width="250px">Shipper Vendor</td> | |
| 132 | <td width="250px"> | |
| 133 | <input type="text" name="shipper" id="shipper" value="" required class="form-control form-control-sm" placeholder="-"> | |
| 134 | </td> | |
| 135 | </tr> | |
| 136 | <tr> | |
| 137 | <td width="250px">No. B/L/AWB</td> | |
| 138 | <td width="250px"> | |
| 139 | <input type="text" name="no_bl_awb" id="no_bl" value="<?php echo $dataku['no_bl'];?>" required class="form-control form-control-sm"> | |
| 140 | </td> | |
| 141 | <td width="250px">Tanggal Tiba</td> | |
| 142 | <td width="250px"> | |
| 143 | <div class='input-group date' id='datetimepicker4'> | |
| 144 | <input type='text' name="tgl_tiba" class="form-control form-control-sm" /> | |
| 145 | <span class="input-group-addon"> | |
| 146 | <span class="fa fa-calendar"></span> | |
| 147 | </span> | |
| 148 | <script > | |
| 149 | $(function () {
| |
| 150 | $('#datetimepicker4').datepicker({
| |
| 151 | format: "dd/mm/yyyy", | |
| 152 | language: "eng", | |
| 153 | autoclose: true, | |
| 154 | todayHighlight: true | |
| 155 | }); | |
| 156 | }); | |
| 157 | </script> | |
| 158 | </div> | |
| 159 | </td> | |
| 160 | </tr> | |
| 161 | <tr> | |
| 162 | <td width="250px">Tanggal B/L/AWB</td> | |
| 163 | <td width="250px"> | |
| 164 | <div class='input-group date' id='datetimepicker5'> | |
| 165 | <input type='text' value="<?php echo $dataku['tgl_bl']; ?>" name="tgl_bl_awb" class="form-control form-control-sm" /> | |
| 166 | <span class="input-group-addon"> | |
| 167 | <span class="fa fa-calendar"></span> | |
| 168 | </span> | |
| 169 | <script > | |
| 170 | $(function () {
| |
| 171 | $('#datetimepicker5').datepicker({
| |
| 172 | format: "dd/mm/yyyy", | |
| 173 | language: "eng", | |
| 174 | autoclose: true, | |
| 175 | todayHighlight: true | |
| 176 | }); | |
| 177 | }); | |
| 178 | </script> | |
| 179 | </div> | |
| 180 | </td> | |
| 181 | <td width="250px">Nama Kapal</td> | |
| 182 | <td width="250px"> | |
| 183 | <input type="text" name="nama_kapal" id="nama_kapal" value="<?php echo $dataku['nama_kapal']; ?>" required class="form-control form-control-sm"> | |
| 184 | </td> | |
| 185 | </tr> | |
| 186 | <tr> | |
| 187 | <td width="250px">Nomor Invoice</td> | |
| 188 | <td width="250px"> | |
| 189 | <input type="text" name="no_invoice" id="no_invoice" value="<?php echo $dataku['no_invoice']; ?>" required class="form-control form-control-sm"> | |
| 190 | </td> | |
| 191 | <td width="250px">Nilai Invoice</td> | |
| 192 | <td width="250px"> | |
| 193 | <input type="text" name="nilai_invoice" id="nilai_invoice" value="<?php echo $dataku['nilai_invoice']; ?>" required class="form-control form-control-sm"> | |
| 194 | </td> | |
| 195 | </tr> | |
| 196 | ||
| 197 | </table><br> |