hi ,
I am creating 1 sales report where I want to show the actual no of items sold to different customer. But the problem is I cant calculate the actual lines sold from item ledger as there may be return order too with the same item no, variant code. i.e
item no. - variant code - invoiced qty - return-
FG-01 vxxbt -1
FG-01 vxxbt -1
FG-01 vxxbt 1 yes
FG-01 vxxbt -2
now please follow the item ledger entry, the actual no of this item sold is 3 as because 1 item returned. this is the problem that i am facing a lot. please help. i want some technical over view of coding. how to proceed. please help.
thanks a lot.
Dynamics NAV
0
Comments
Did you pay someone to reply? If so speak to that person, or ask for your money back. :thumbsdown:
even though the only time you have offered help to someone else was to tell them they are stupid?
:-k
RIS Plus, LLC
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
As a rough estimate we could say that entries grouped by customer and by posting date can be considered a sales each. I.e. I ship 6 PCS, realize it was wrong, correct -1 with a return order, then I have a daily sum of 5, and consider that one sales. If the daily sum would be 0, because it was fully returned, no sales. Something like that.
I don't really think it's possible to nail it down exactly...
Just to give you an idea, the heavy posters on this site are almost all from Europe or the US. That's anywhere from a 5 to 13 hour time difference from you. We are here because we enjoy helping people, but that doesn't mean we all check for new posts every 5 minutes.
If you need an immediate answer call your NAV Partner. If you are a NAV Partner ask someone you work with.
My Blog - nav.education
actually i want to create a report of sold items. qty is important. as i said there may be lots of possibility in item ledger entry. but i am not worried about shipped item, but those item which are sold or posted completely with invoice. but there are lots of return order with invoice too with the same item no, variant as i mentioned earlier.
i am only dealing with invoice qty <>0 , as you mentioned i may sell 6 items with invoice to a customer, then the customer returned 1 with invoice. then the actual no of same item sold is 5.
so i want the qty 5 instead of 6. and there are lots of different kind of items to track from IL whether there is any return order with this item. to my report i want the actual no of item sold by subtracting the returned item. i hope you understand now. please help.
bye the way is it possible to change a record of a field at the time of report processing. i.e
item no. - variant code - invoiced qty - return-
FG-01 vxxbt -1
FG-01 vxxbt -1
FG-01 vxxbt 1 yes
FG-01 vxxbt -2
FG-01 vxxbt -6
FG-01 vxxbt 1 yes
so the actual qty sold is 8. how can i calculate this into my report. i was applying some logic into my code. i wanted to calculate the total no of -Ve invoiced qty and the compared with the total no of returned +Ve invoiced qty with the same item no,variant code to calculate the actual no of qty sold. but it didnt work.
thanks a million
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
like i said there may be lots of items with same item no, variant code and there may be multiple return order with the same item no, variant code. so how to calculate the exact no of qty sold.
like this way... [sold items(invoiced) 10 - returned items(invoiced) 2] = 8
this is the logic. but i could nt implement this into my report.
i was trying to do something like this
if invoiced qty < 0 then begin
Itemno := "Item Ledger Entry"."Item No.";
Varcode := "Item Ledger Entry"."Variant Code";
Invcty := "Item Ledger Entry"."Invoiced Quantity";
"Item Ledger Entry".SETRANGE("Item Ledger Entry"."Item No.",Itemno);
"Item Ledger Entry".SETRANGE("Item Ledger Entry"."Variant Code",Varcode);
"Item Ledger Entry".SETRANGE("Item Ledger Entry"."Invoiced Quantity",-Invcty);
"Item Ledger Entry".SETRANGE("Item Ledger Entry"."Return Reason Code",'R');
IF "Item Ledger Entry".FIND('-') THEN
repeat
(here i wanted to sum the no of returned orde qty with same item)
until findlast
.....
.....
(here to sum the qty of sold items with same item)
.....
....
then by subtracting returned qty from sold qty i can get the actual qty sold.
i know the code is not complete..i just give it to make u understand. even though i am able to calculate the actual quantity but is it possible to change the value of the quantity field of a record at the time of report posting.
A good example of why analysis is so very important.
Anityam it is totally pointless you starting development if you don't know what you are trying to develop.
*
Please, do not frighten the ostrich,
the floor is concrete.
have you discussed this with the client? Are you fully aware what hey want? Do you understand the business requirement here?
Just throw all this out and start new. The route you are following now is heading to disaster.
Sit with the client and work out what they need, document it then review the document with them. Once that is done call it a spec and then you can analyze the spec to decide how to code it. Once that is done create a prototype and review this with the client to see if you really did understand the need. Then you can start writing code.
my client is a fashion house. they send dresses to different boutiques every month with invoiced as like they are selling those dresses to those boutiques. then those boutiques(customer) sell dresses to their own customers. and after that they make it confirm to my client that how many dresses they sold actually and how many of them are not sold and returned those unsold dresses to my client every month. so now you can see that at the beginning of the month my client might have sold 100 shirts to 1 boutique, but at the end of the month there may be 50 shirts left to sold, which are returned to my client. so actual no of sold shirts are 50 not 100. and this is the No.(50) i want on my report after keeping every possibilities in my head as i told you earlier.
there are three possibilities
1. if the item is only shipped(i am not thinking about this at all) not sold
2. how many of those are sold (invoiced quantity -100)
3. how many of those are returned (invoiced quantity 50)
those are the possibilities from which i have to calculate the exact quantity sold. and mind it there are lots of items with different variant, thousands of each.
this is the problem what is kicking me a lot.
anyways thanks again for your suggestion.
Like David said, simply starting to write code is most often the opposite from what should actually be done.
The real problem behind this of course might be that the company you work for is not providing you with the proper resources to succeed.
RIS Plus, LLC
thanks.
RIS Plus, LLC