Esempio n. 1
0
    } else {
        $account = NULL;
        $account_type = NULL;
    }
    $date = new DateTime('now', new DateTimeZone('Asia/Karachi'));
    $date = $date->format("j-n-Y");
    // Add General Ladger
    // $results = $accounts->create_general_ledger($amount, $type, $account, $account_type, $date);
    $results_general_ledger = $accounts->create_general_ledger($bill_amount, $type, $account, $account_type, $date);
    $account = 'supplier';
    $account_type = $supplier_id;
    $type = 'payable';
    $status = 0;
    // Add Account Payable
    //$results = $accounts->create_payable_receviable($amount, $account, $person, $date, $due_date, $type, $status);
    $results_account_payable = $accounts->create_payable_receviable($bill_amount, $account, $account_type, $date, $due_date, $type, $status);
    if (isset($results_account_payable)) {
        echo '<div class="alert alert-success" role="alert"> Add Purchase Sucessfully </div>';
    } else {
        echo '<div class="alert alert-danger" role="alert"> Error </div>';
    }
}
?>

			<form class="form-horizontal dashboardForm"  action="" method="post">
			<div class="col-md-6">	
				<div class="form-group">
					<label for="supplier_id" class="col-sm-3 control-label">Supplier Name: </label>
					<div class="col-sm-8" style="margin-top:7px;">
						<select name="supplier_id">
							<?php