Please Reply-Sales Report

anityamanityam Member Posts: 13
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

Comments

  • anityamanityam Member Posts: 13
    nobody replied to my query yet... :(
    Dynamics NAV
  • David_SingletonDavid_Singleton Member Posts: 5,479
    anityam wrote:
    nobody replied to my query yet... :(

    Did you pay someone to reply? If so speak to that person, or ask for your money back. :thumbsdown:
    David Singleton
  • anityamanityam Member Posts: 13
    no i didnt pay to anybody ... i just want some help on my query from friends over here if anybody can suggest me some solution of it....
    Dynamics NAV
  • David_SingletonDavid_Singleton Member Posts: 5,479
    anityam wrote:
    no i didnt pay to anybody ... i just want some help on my query from friends over here if anybody can suggest me some solution of it....

    even though the only time you have offered help to someone else was to tell them they are stupid?
    anityam wrote:
    are u a stupid..u r working for 3 yrs n u dont know wat shld be d role n responsibility of a nav technical guy...common...

    :-k
    David Singleton
  • anityamanityam Member Posts: 13
    ok.im sorry for that...
    Dynamics NAV
  • DenSterDenSter Member Posts: 8,305
    Besides that, one hour is not a very long time on forums like these. When you post a question it can take up to a day or two to get a reply. If you don't get a reply within a day or two it's OK to bump a post once or twice, but to come back within an hour and demand solutions is considered bad manners. You need to be patient and not expect to get immediate replies to anything.
  • kinekine Member Posts: 12,562
    anityam wrote:
    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.
    Nobody answered, because your request is not clear. Yes, there are 4 unites sold, one returned. What is the problem?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    So basically what you need is not the qty. sold but how many TIMES was it sold. That's a bit unusual and will not be easy as there can be many possible problems f.e. I must ship 5 PCS but in error I ship first 3 and then 2. Now it will look like two sales instead of one.

    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...
  • matttraxmatttrax Member Posts: 2,309
    anityam wrote:
    nobody replied to my query yet... :(

    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.
  • anityamanityam Member Posts: 13
    thanks for your kind reply.

    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
    Dynamics NAV
  • anityamanityam Member Posts: 13
    i need the qty not how many times i sold.
    Dynamics NAV
  • kinekine Member Posts: 12,562
    What about just SUM the numbers? Still, I do not understand where is the problem. For me it seems that you haven't understand what you really want and you need to make it clear for yourself first.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • anityamanityam Member Posts: 13
    well i think i could not make you understand. i just want the actual no of quantity sold.
    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.
    Dynamics NAV
  • David_SingletonDavid_Singleton Member Posts: 5,479
    kine wrote:
    What about just SUM the numbers? Still, I do not understand where is the problem. For me it seems that you haven't understand what you really want and you need to make it clear for yourself first.


    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.
    David Singleton
  • bstoyanobstoyano Member Posts: 134
    i just like to add that in my country there is a saying, which roughly means "Truth is bourne through argument" :D . I have noticed that it is much easier, faster and more accurate to reach to clarification when you talk to people about your ideas, sentiments, presentiments, anticipations, hypotheses, i.e. all the para-rational thinking that goes into your head. And for this communication you need the right people around you. If they are not available ... ](*,)
    Boris
    *
    Please, do not frighten the ostrich,
    the floor is concrete.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    anityam wrote:
    well i think i could not make you understand. i just want the actual no of quantity sold.
    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.


    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.
    David Singleton
  • anityamanityam Member Posts: 13
    thanks for replying

    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.
    Dynamics NAV
  • DenSterDenSter Member Posts: 8,305
    I see two problems here:
    • You don't understand the customer's request, which means you don't understand their business. You should probably get someone with more experience than you to come onsite with the customer, so you can learn how to approach these issues.
    • You don't know how to translate what you THINK is the customer request, which indicates to me that you are also not very experienced in development. Totalling numbers in a report is a basic skill, that requires very little code. You need to get a senior developer involved to explain report writing to you, and possibly take some training.

    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.
  • anityamanityam Member Posts: 13
    i think this is not an issue of totaling on a field. i know how to do it. totaling on a field means you are telling the report to keep up with totals for that field throughout the report. there are lots of items with different variant, different item no.,which need proper validation to find and separate same bunches of line with same item no,same variant, not only that i need to see how many lines are there with invoiced or sold, what is the qty, whether there is any line with return order with the same item no or not and if there is any then what is the qty.... narrowing the search would be ok.

    thanks.
    Dynamics NAV
  • DenSterDenSter Member Posts: 8,305
    If you are convinced that you would not benefit from looking at it from a different perspective, there's not much more I can say.
Sign In or Register to comment.