public PurchaseOrder VHasNoPurchaseReceival(PurchaseOrder purchaseOrder, IPurchaseReceivalService _purchaseReceivalService) { IList <PurchaseReceival> purchaseReceivals = _purchaseReceivalService.GetObjectsByPurchaseOrderId(purchaseOrder.Id); if (purchaseReceivals.Any()) { purchaseOrder.Errors.Add("Generic", "Memiliki asosiasi dengan purchase receival"); } return(purchaseOrder); }