コード例 #1
0
        /// <summary>
        /// 付款单是否被供应商锁定
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public virtual bool IsHoldByVendor(PayItemInfo entity)
        {
            var pay = ObjectFactory <PayableProcessor> .Instance.LoadBySysNo(entity.PaySysNo.Value);

            bool result = false;

            if (entity.OrderType == PayableOrderType.PO)
            {
                result = ExternalDomainBroker.IsHolderVendorByPOSysNo(pay.OrderSysNo.Value);
            }
            else if (entity.OrderType == PayableOrderType.VendorSettleOrder)
            {
                result = ExternalDomainBroker.IsHolderVendorByVendorSettleSysNo(pay.OrderSysNo.Value);
            }
            else if (entity.OrderType == PayableOrderType.CollectionSettlement)
            {
                result = ExternalDomainBroker.IsHolderVendorByCollectionSettlementSysNo(pay.OrderSysNo.Value);
            }
            return(result);
        }