Example #1
0
        internal async Task ManuallyAllocate(AsycudaSalesAllocationsEx callo, PreviousDocumentItem previousEntry)
        {
            if (callo.ItemNumber != previousEntry.ItemNumber) //BaseViewModel.Instance.CurrentAsycudaSalesAllocationsEx
            {
                var res = MessageBox.Show(
                    string.Format("The Sales ItemNumber '{0}' is not the same as Previous Entry ItemNumber '{1}' do you want to continue?"
                                  , callo.ItemNumber, previousEntry.ItemNumber)
                    , "Inventory Item Mis-match", MessageBoxButton.YesNo);
                if (res == MessageBoxResult.No)
                {
                    return;
                }
            }

            if (Convert.ToDouble(callo.SalesQuantity) > (previousEntry.ItemQuantity - previousEntry.QtyAllocated))
            {
                var res = MessageBox.Show(
                    string.Format("The Sales Quantity '{0}' is larger than Previous Entry Quantity Available to allocate '{1}' do you want to continue with partial fill?"
                                  , callo.SalesQuantity.ToString(), (previousEntry.ItemQuantity - previousEntry.QtyAllocated).ToString())
                    , "Partial Allocation", MessageBoxButton.YesNo);
                if (res == MessageBoxResult.No)
                {
                    return;
                }
            }

            await AsycudaSalesAllocationsExRepository.Instance.ManuallyAllocate(callo.AllocationId, previousEntry.Item_Id).ConfigureAwait(false);

            MessageBus.Default.BeginNotify(QuerySpace.AllocationQS.MessageToken.AsycudaSalesAllocationsExsChanged, null,
                                           new NotificationEventArgs(QuerySpace.AllocationQS.MessageToken.AsycudaSalesAllocationsExsChanged));
        }
Example #2
0
 internal void SavePreviousDocumentItem(PreviousDocumentItem previousDocumentItem)
 {
     throw new NotImplementedException();
 }
 public async Task <PreviousDocumentItem> CreatePreviousDocumentItem(PreviousDocumentItem entity)
 {
     return(await Channel.CreatePreviousDocumentItem(entity).ConfigureAwait(false));
 }