Example #1
0
        private void btnDirectGRKS_Click(object sender, EventArgs e)
        {
            // Console
            Console.WriteLine($"(R) Creating direct goods-in to freezer...");

            if (Delivery.ZeroBatchLineNums.Count > 0)
            {
                var grItems = Delivery.CreateGoodsReceiptItemsFromZeroBatchLineNums();

                var result = GoodsReceipt.CreateGoodsReceipt(Sap_Ks, grItems, null);


                // Console
                if (result != 0)
                {
                    Console.WriteLine($"Error: {Sap_Ld.oCompany.GetLastErrorDescription()}" + Environment.NewLine);
                }
                else
                {
                    Console.WriteLine($"Success: {Sap_Ld.oCompany.GetNewObjectKey()}" + Environment.NewLine);
                }
            }
            else
            {
                Console.WriteLine($"No items for direct goods receipt.");
            }
        }
Example #2
0
        private void btnDirectGR_Click(object sender, EventArgs e)
        {
            // Console
            Console.WriteLine($"(K) Creating direct goods-in to shop...");


            if (Delivery.GoodsReceiptItems.Count > 0)
            {
                int bplid  = Delivery.oDraft.BPL_IDAssignedToInvoice;
                var result = GoodsReceipt.CreateGoodsReceipt(Sap_Ld, Delivery.GoodsReceiptItems.ToArray(), bplid);


                // Console
                if (result != 0)
                {
                    Console.WriteLine($"Error: {Sap_Ld.oCompany.GetLastErrorDescription()}" + Environment.NewLine);
                }
                else
                {
                    Console.WriteLine($"Success: {Sap_Ld.oCompany.GetNewObjectKey()}" + Environment.NewLine);
                }
            }
            else
            {
                Console.WriteLine($"No items for direct goods receipt.");
            }
        }