Ejemplo n.º 1
0
        public DeliveryOrder VHasNoSalesInvoice(DeliveryOrder deliveryOrder, ISalesInvoiceService _salesInvoiceService)
        {
            IList <SalesInvoice> salesInvoices = _salesInvoiceService.GetObjectsByDeliveryOrderId(deliveryOrder.Id);

            if (salesInvoices.Any())
            {
                deliveryOrder.Errors.Add("Generic", "Sudah memiliki sales invoice");
            }
            return(deliveryOrder);
        }