<input type="text" name="doc_date" value="" id="doc_date" /><br /> <label for="doc_type">Document Type </label> <select type="text" name="doc_type" value="" id="doc_type"> <option value="1">PR1 – Purchase Request (Assets)</option> <option value="2">PR2 – Purchase Request (Stocks)</option> <option value="3">PR3 – Purchase Request (Service)</option> <option value="4">PR4 – Purchase Request (PCSB)</option> <option value="5">PR5 - Purchase Request (3rd Party)</option> <option value="6">PR6 - Purchase Request (GD9)</option> <option value="7">PR7 - Purchase Request</option> <option value="8">PR8 - Purchase Request</option> </select><br /> <label for="branch_id">Ship To Branch </label> <select type="text" name="branch_id" id="branch_id"><?php $user = new User(fAuthorization::getUserToken()); Branch::findAllOption($user->getBranchId()); ?> </select><br /> <input type="hidden" id="hiddenBranch" value="<?php echo $user->prepareBranchId(); ?> " /> <label for="currency_id">Currency </label> <select type="text" name="currency_id" id="currency_id"> </select><br /> </div> <div class="supplierBox span-23 last"> <div id="box1" class="boxes span-7"> <b>Supplier 1</b><br /> <input type="text" id="sup1auto"></input><input type="hidden" id="sup1"></input> <br />
<?php include '../resources/init.php'; if (isset($_POST['type'])) { if ($_POST['type'] == "option") { Branch::findAllOption(); } else { if ($_POST['type'] == "edit") { try { $branch = new Branch($_POST['key']); $branch->populate(); $branch->store(); } catch (fExpectedException $e) { echo $e->printMessage(); } } else { if ($_POST['type'] == "delete") { try { $branch = new Branch($_POST['key']); $branch->delete(); } catch (fExpectedException $e) { echo $e->printMessage(); } } else { if ($_POST['type'] == "add") { try { $branch = new Branch(); $branch->populate(); $branch->store(); $theId = $branch->getId(); $ids = Inv_item::findIdUB($db);
</span> <br /> <label for="doc_date">Document Date </label> <span id="doc_date"><?php echo $purchase->prepareDocDate("j F Y"); ?> </span><br /> <label for="doc_type">Document Type </label> <?php echo strtoupper($purchase->prepareDocTag()) . $purchase->prepareDocType(); ?> <br /> <label for="branch_id">Ship To Branch </label> <select type="text" name="branch_id" id="branch_id" style="display: inline;"><?php $user = new User(fAuthorization::getUserToken()); Branch::findAllOption($purchase->prepareBranchId()); ?> </select> <span id="branch_view" class="tochange"><?php $branch = new Branch($purchase->getBranchId()); echo $branch->prepareName() . " / " . $purchase->prepareBranchId(); ?> </span><br /> <label for="currency_id">Currency </label> <select type="text" name="currency_id" id="currency_id" style="display: inline;"></select> <span id="currency_view" class="tochange"><?php $currency = new Currency($purchase->getCurrency()); echo $currency->prepareCountry() . " [" . $currency->prepareExchange(2) . "]"; ?> </span> <div class="supplierBox span-23 last">