<!DOCTYPE html>
<html >
<head>
  <meta charset="UTF-8">
  <title>Packing List</title>
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800&display=swap" rel="stylesheet">
</head>
<?php $row = $records['0']; ?>
<body style="font-family: 'Open Sans', sans-serif;color: #000;">
  <div style="padding: 0px 0;">
    <div style="width: 800px;margin-right: auto;margin-left: auto;">
      <div style="margin-right: -15px;margin-left: -15px;">
        <header style="display: block;">
          <div style="width: 46%;float: left;position: relative;box-sizing: border-box;min-height: 1px;padding-right: 0px;padding-left: 15px;">
            <div>
              <div style="text-align: left;">  
                <h2 style="font-size: 20px;line-height: 22px;margin-top: 5px;margin-bottom: 0px;font-weight: bold;"><?php echo $row->Comp_Name; ?></h2>
                <div class="detial"  style="font-size: 14px;line-height:6px;margin-top: 5px;margin-bottom: 0px; font-weight: normal;">
                  <P style="font-weight: bold; font-size: 15px;"><?php echo $row->Comp_Add1; ?></P>
                  <P style="font-weight: bold; font-size: 15px;">
                    <?php echo $row->Comp_City; ?>, 
                    <?php echo $row->Comp_State; ?> - 
                    <?php echo $row->Comp_Zip; ?>, 
                    <?php echo $row->Comp_Country; ?></P>
                  <P style="font-weight: bold">Phone :<?php echo $row->Acrep_Phone; ?> &nbsp; Fax: <?php echo $row->Comp_Fax; ?></P>
                  <P><a style="color:#000;cursor: pointer;text-decoration: none; font-weight: bold"><?php echo strtolower($row->Comp_Email); ?></a> &nbsp; <a style="color:#000;cursor: pointer;text-decoration: none; font-weight: bold"><?php echo strtolower($row->Comp_Web); ?></a></P>
                </div>
              </div>
            </div>
          </div>
          <div style="width: 54%;float: left;position: relative;box-sizing: border-box;min-height: 1px;padding-right: 15px;padding-left: 15px;">
            <h2 style="border: 1px solid #000; font-weight: bold; font-size: 18px; width: 200px; float: right; text-align: center; margin-top: 0px;">Packing List</h2>
          </div>
        </header>
      </div>
      <div style="margin-right: -15px;margin-left: -15px;">
        <div style="display: block;">
          <div style="width: 46%;position: relative;box-sizing: border-box;min-height: 1px;padding-right: 0px;padding-left: 15px;">
            <div>
              <div style="width: 100%;float: left;position: relative;box-sizing: border-box;">
                <h5 style="border: 1px solid;font-size: 15px;line-height: 15px;background-color: #dddddd;box-sizing: border-box;font-weight: bold;padding: 5px;width: 90%;text-align: center;margin-top: 10px;margin-bottom: 0px;">Customer:</h5>
                <p style="font-size: 14px;line-height: 22px;font-weight: 400;margin: 0px;"><?php echo $row->NM_AC; ?></p>
                <p style="font-size: 14px;line-height: 22px;font-weight: 400;margin: 0px;"><?php echo $row->NM_ADDRESS1; ?> <?php echo ($row->NM_ADDRESS2) ? ', '.$row->NM_ADDRESS2 : ''; ?></p>
                <p style="font-size: 14px;line-height: 22px;font-weight: 400;margin: 0px;"><?php echo $row->NM_CITY; ?>, <?php echo $row->NM_STATE; ?>,<?php echo $row->ZIP; ?>,<?php echo $row->NM_COUNTRY; ?></p>
                <p style="font-size: 14px;line-height: 22px;font-weight: 400;margin: 0px;">Phone: <?php echo $row->AD_PHONE1; ?> 
                  <?php echo ($row->AD_FAX) ? 'Fax: '.$row->AD_FAX : ''; ?></p>
              </div>
            </div>
          </div>
          <div style="width: 54%;float: left;position: relative;box-sizing: border-box;min-height: 1px;padding-right: 15px;padding-left: 15px;">
            <div>
              <div style="width: 33.33333333%;float: left;position: relative;box-sizing: border-box;min-height: 1px;">
              </div>
              <div style="width: 66.66666667%;float: right;position: relative;box-sizing: border-box;">
                <h5 style="border: 1px solid;font-size: 15px;line-height: 15px;background-color: #dddddd;box-sizing: border-box;font-weight: bold;padding: 5px;text-align: center;margin-top: 10px;margin-bottom: 0px;">
                Ship To:</h5>
                <p style="font-size: 14px;line-height: 22px;font-weight: 400;margin: 0px;"><?php echo $row->NM_STORE; ?></p>
                <p style="font-size: 14px;line-height: 22px;font-weight: 400;margin: 0px;"><?php echo $row->ADDRESS1; ?>,<?php echo $row->ADDRESS2; ?></p>
                <p style="font-size: 14px;line-height: 22px;font-weight: 400;margin: 0px;"><?php echo $row->CITY; ?>, <?php echo $row->STATE; ?>, <?php echo $row->ZIP; ?>, <?php echo $row->COUNTRY; ?>  </p>
                <p style="font-size: 14px;line-height: 22px;font-weight: 400;margin: 0px;">Phone: <?php echo $row->PHONE1; ?>
                  <?php echo ($row->FAX) ? 'Fax: '.$row->FAX : ''; ?></p>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div style="clear:both;"></div>
      <div  style="margin: 0px;min-height: .01%;box-sizing: border-box;font-family: !arial important;color: #211a50;overflow-x: auto;">
        <div >
          <table  style="border: 1px solid #333;width: 100%;max-width: 100%;margin-bottom: 0px;background-color: transparent;border-spacing: 0;box-sizing: border-box;border-collapse: collapse;    margin-top: 20px;">
            <thead>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">PO # </th>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">Sales Person</th>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">Terms</th>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">Due Date</th>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">Desp. Date</th>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">Ship Via</th>
            </thead>
            <tbody>
              <tr style="border-collapse: collapse;box-sizing: border-box;">
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px; color:#000;font-weight: 600;"><?php echo $row->Po; ?></td>
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px; color:#000;font-weight: 600;"><?php echo $row->Sales_Person; ?></td>
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px; color:#000;font-weight: 600;"><?php echo $row->Terms; ?></td>
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px; color:#000;font-weight: 600;"><?php echo date('m/d/Y',strtotime(str_replace('Z', "", $row->Due_Date))); ?></td>
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px; color:#000;font-weight: 600;"><?php echo date('m/d/Y',strtotime(str_replace('Z', "", $row->DT_SALE))); ?></td>
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px; color:#000;font-weight: 600;"><?php echo $row->Ship_Via; ?></td>
              </tr>
            </tbody>
          </table>
          <table style="border: 1px solid #333;width: 100%;max-width: 100%;margin-bottom: 0px;background-color: transparent;border-spacing: 0;box-sizing: border-box;border-collapse: collapse;">
            <thead>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">Ship Method  </th>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">Options </th>
              <th style="background-color:#dddddd;border: 1px solid #333;padding: 2px;line-height: 20px;vertical-align: top;text-align: center;font-size: 14px;font-weight: bold; color:#000;">Tracking #</th>
            </thead>
            <tbody>
              <tr style="border-collapse: collapse;box-sizing: border-box;">
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px;color: #000;font-weight: 600;"><?php echo $row->Ship_Method; ?></td>
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px;color: #000;font-weight: 600;"><?php echo $row->M_OPTION; ?></td>
                <td style="border: 1px solid #333;padding: 8px;line-height: 10px;vertical-align: top;text-align: center;font-size: 13px;color: #000;font-weight: 600;"><?php echo $row->Tracking; ?></td>
              </tr>
            </tbody>
          </table>
          <table style="border: 1px solid #333;width: 100%;max-width: 100%;margin-bottom: 0px;background-color: transparent;border-spacing: 0;box-sizing: border-box;border-collapse: collapse;">
            <thead>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Sr. #</th>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Ref #</th>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Item / Description </th>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Pcs.</th>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Wt.</th>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Rap Price</th>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Disc. %</th>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Price/Cts</th>
              <th style="background-color:#dddddd; border: 1px solid #333;line-height: 18px;vertical-align: top;text-align: center;font-size: 14px;color: #000;">Net Amount $</th>
            </thead>
            <tbody>
              <?php $vi = 0; foreach ($records as $valarr): $vi++;  ?>
              <tr style="border-collapse: collapse;box-sizing: border-box;">
                <td style="border: 1px solid #333;vertical-align: top;text-align: center;font-size: 13px;line-height: 24px;color: #000;font-weight: bold;font-weight: 600;"><?php echo $vi; ?></td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: center;font-size: 13px;line-height: 24px;color: #000;font-weight: bold;font-weight: 600;"><?php echo $valarr->Ref; ?></td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: left;font-size: 13px;line-height: 24px;color: #000;font-weight: bold; font-weight: 600; padding-left:5px;">
                  <table cellspacing="0" cellpadding="0" border="0" width="100%" style="width: 100%;">
                    <tr>
                      <td style="font-size: 12px"><?php echo $valarr->Item; ?> <br/> <?php echo $valarr->NM_REMARK; ?></td>
                      <td align="right">
                        <a href="https://dna.dnalink.in/d/<?php echo $valarr->Item; ?>" style="text-decoration: none;" target="_blank">
                          <span style="border: 1px solid #000000;margin-right:10px;color: #000;padding: 4px;text-align: center;width: 87px;height: 30px;outline: 0;background: none;">Video Link</span>
                        </a>
                         <!--  <span style="border: 1px solid #000000;margin-right:10px;color: #000;padding: 7px;text-align: center;width: 87px;height: 30px;outline: 0;background: none;">Video Link</span> -->
                      </td>
                    </tr>
                  </table>
                </td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: center;font-size: 13px;line-height: 24px;color: #000;font-weight: bold; font-weight: bold;"> <?php echo $valarr->Pcs; ?></td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: center;font-size: 13px;line-height: 24px;font-weight: 600;color: #000;"><?php echo $valarr->Wt; ?></td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: center;font-size: 13px;line-height: 24px;font-weight: 600;color: #000;"><?php echo $valarr->Rap_Price; ?></td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: right;font-size: 13px;line-height: 24px;color: #000;font-weight: 600;padding-right: 5px"><?php echo $valarr->Disc; ?></td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: center;font-size: 13px;line-height: 24px;color: #000;font-weight: bold;font-weight: 600;"><?php echo round($row->Net_Amount/$row->Wt); ?></td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: center;font-size: 13px;line-height: 24px;color: #000;font-weight: bold; font-weight: bold;"><?php echo $valarr->Net_Amount; ?></td>
              </tr>
              <?php endforeach ?>
              <tr style="border-collapse: collapse;box-sizing: border-box;">
                <td colspan="3" style="border: 1px solid #333;vertical-align: top;text-align: right;font-size: 13px;line-height: 24px;color: #000;font-weight: bold;font-weight: 600;padding-right: 5px;">Total : </td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: center;font-size: 13px;line-height: 24px;color: #000;font-weight: bold;font-weight: 600;"> <?php echo $valarr->PCS_TOTAL; ?></td>
                <td style="border: 1px solid #333;vertical-align: top;text-align: left;font-size: 13px;line-height: 24px;color: #000;font-weight: bold; font-weight: 600; "> 
                  <?php echo $row->WT_TOTAL; ?>
                </td>
                <td colspan="4" style="border: 1px solid #333;vertical-align: top;text-align: right;font-size: 13px;line-height: 24px;color: #000;font-weight: bold; font-weight: bold; padding-right: 5px;"><?php echo $row->AM_ITEM; ?></td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <div style="margin: 5px 0 0px;box-sizing: border-box;display: inline-block;border: 2px solid #ccc;border-radius: 10px;">
        <div style="float: left !important;width: 66.66666667%;position: relative;min-height: 1px;padding-right: 15px;padding-left: 15px;box-sizing: border-box;">
          <p style="margin: 0;font-size: 14px;text-transform: uppercase;font-weight: 400;">Pl. check the goods on receipt of delivery</p>
          <p style="margin: 5px 0px 0px;font-size: 10px;font-weight: 400;text-transform: uppercase;">"The diamonds herein invoiced have been purchased from legitimate sources not involved in funding conflict
            and are compliance with United Nations Resolutions. I hereby guarantee that these diamonds are conflict free,
          based on personal knowledge and/or written guarantees provided by the supplier of these diamonds."</p>
        </div>
        <div style="float: left !important;width: 33.33333333%;position: relative;min-height: 1px;padding-left: 15px;box-sizing: border-box;">
          <table >
            <td>
              <table cellpadding="0" cellspacing="0" border="0" style="background-color: #dddddd;border: 1px solid #000;padding: 3px;">
                <tr><td style="display: list-item;list-style: outside none none;text-align: right !important;text-decoration: none;max-width: 100%;  font-weight: 700;font-size: 13px; ">Bank Charges :</td></tr>
                <tr><td style="display: list-item;list-style: outside none none;text-align: right !important;text-decoration: none;max-width: 100%;  font-weight: 700;font-size: 13px; ">Shipping / Insurance :</td></tr>
                <tr><td style="display: list-item;list-style: outside none none;text-align: right !important;text-decoration: none;max-width: 100%;  font-weight: 700;font-size: 13px; ">Discount :</td></tr>
                <tr><td style="display: list-item;list-style: outside none none;text-align: right !important;text-decoration: none;max-width: 100%;  font-weight: 700;font-size: 13px; ">Total Amount :</td></tr>
              </table>
            </td>
            <td>
              <table>          
                <tr><td style="position: relative;min-height: 1px;box-sizing: border-box; padding-right: 2px;font-size: 12px; line-height: 15px;    width: 82px; font-weight: 600; text-align: right;"><?php echo $row->AM_TAXES; ?></td></tr>
                <tr><td style="position: relative;min-height: 1px;box-sizing: border-box; padding-right: 2px;font-size: 12px; line-height: 15px;    width: 82px; font-weight: 600; text-align: right;"><?php echo $row->AM_SHIPPING; ?></td></tr>
                <tr><td style="position: relative;min-height: 1px;box-sizing: border-box; padding-right: 2px;font-size: 12px; line-height: 15px;    width: 82px; font-weight: 600; text-align: right;"><?php echo $row->AM_DISCOUNT; ?></td></tr>
                <tr><td style="position: relative;min-height: 1px;box-sizing: border-box; padding-right: 2px;font-size: 12px; line-height: 15px;    width: 82px; font-weight: 600; text-align: right;"><?php echo $row->AM_NET_BASE; ?></td></tr>
              </table>
            </td>
          </table>
        </div>
      </div>
    </div>
  </div>
</body>
</html>
