示例#1
0
 /**
  * creating a PO
  *
  * @param Supplier $supplier
  * @param string   $supplierRefNo
  * @param string   $supplierContact
  * @param string   $supplierContactNumber
  * @param string   $shippingCost
  * @param string   $handlingCost
  * @param bool	   $isCredit
  *
  * @return PurchaseOrder
  */
 public static function create(Supplier $supplier, $supplierRefNo = '', $supplierContact = '', $supplierContactNumber = '', $shippingCost = 0, $handlingCost = 0, $isCredit = false, PurchaseOrder $fromPO = null)
 {
     $entity = new PurchaseOrder();
     return $entity->setSupplier($supplier)->setSupplierRefNo(trim($supplierRefNo))->setSupplierContact($supplierContact)->setSupplierContactNumber($supplierContactNumber)->setshippingCost($shippingCost)->sethandlingCost($handlingCost)->setIsCredit($isCredit)->setFromPO($fromPO)->save();
 }