Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Invoicing totals

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    Re: Invoicing totals

    http://dl.dropbox.com/u/14979559/can...d%20either.swf

    even on the cansave there is a problem if you do not SAVE the record, and skip to prior or next as video shows
    code is behind onflyover as well, as you can see the invoice header invoice total then updates to match the calculated one to the right of it.

    Everything works 90% nothing works 100%

    onchange SHOULD fire when the total field updates END of STORY

    Thanks for trying SNusa

    Comment


      #77
      Re: Invoicing totals

      Originally posted by markusof View Post
      This only works if you change something in the FORM after you've entered your details.. which is not how people work.
      I already work with systems that, ah, you have to do this, then that, then this, cause that's the way it's written - I don't put out crap like that..

      It's like when I was working at FORD, ah, pop up an error message in about 3 months so we can fix the program again..

      Thanks for the reply, but it doesn't work anyway you put it, I emailed the guy that started the thread, that gave up and moved onto another product, WHICH I think I'm looking at as well..
      These won't work because the parent isn't always getting an update when it should:
      What about using an embedded browse "onfetch" event along with topparent.commit()?
      Nope, the problem you have is that nothing happens outside the browse, right?
      (and you have to either hit a save button, or navigate off record to save value...)


      Actually you can do what you want, and this is how to do it:

      Place a button on the embedded browse which shows the value in the underlying table. (instead of a simple record field)
      On the event event of this browse button... add this:

      I just tried it, and it works....... (9 lines of code)
      • Extra code exists to handle cancelling entry when a user hits cancel or exits instead of save
      • ui_get_number() forces numeric data entry and thus validates user input




      USER GETS TO:
      Clicks on the field to edit, (enters the new data and clicks OK) - THAT's IT!
      (And the calculated fields on the form are updated instantly!)

      The solution uses a popup via ui_get_number() which you do have to click OK on with option to cancel/exit instead.
      The field in the embedded browse is actually a hidden button displaying the fields data.
      The custom button when setup properly, looks exactly like it did when it was a field.

      It's still the same amount of clicks (2) since you would first have to click to select the field/row anyways, and then click off the field to commit the new value entered in the field.)


      Code:
      	[B]this.Set_Viewport_row(row) ' this first set_viewport_row line of code is automatically added by a5
      	vc_Value=ui_get_number("QUANTITY:","Sold",this:quantity.text,"")[/B]
               ' ----->substitute your embedded browse field column object name for quantity
      
               'vc_Value=ui_get_number("QUANTITY:","Sold",this.quantity.text,"")
               ' ----->  this.quantity also works instead of the :  (but since quantity is too, using : is perferrable??????)
      
      	[B]if vc_value="" then
      		 end
      	end if
      	vn_value=val(vc_value)
      	this:quantity.value = vn_Value[/B]
              ' -----> again, substitute your embedded browse field column object name for quantity.
      
      	[B]this.Set_Viewport_row(row) 'which you have to add manually
      
              topparent.refresh()[/B] ' should take care of refreshing the parent form so the calculate field displays properly..
              ' (not actually necessary though, as totals were changing with the one button click in child form field that was changed)
              [B]topparent.commit()[/B] 'saves the parent table....
      
              'this gets you 95% of the way there.....
              'with a properly setup calculated field based this embedded browse column,
              'everything should work.  (the quantity object in this example)
              'now just add the code here to reset the value of a locked field (parent field) bound to the header table.
       
      
              ' where <objectname> is the name of the embedded browse field.
               'the first this.Set_Viewport_row(row) sets the row
               'the second instance of this.Set_Viewport_row(row) updates the calculated field.
      • Written this way, it works on a numerical field. The button is capturing the numeric value and displaying this value via: str(Invoice_Items->Quantity,20,0,",") ~ You'll have to change 20 depending upon browse field size so user can click anywhere on the hidden button and get results. (use a colored button first to see what is needed) ~ This expression is placed in Button text field on enter button window)
      • You can format differently as you wish depending on what field displaying. Also, if you change to a custom style of button, you can make the button look just like it's a field and not even a button....
      • The above code captures a new value, and immediately updates the row and the calculated field values shown on fields in the parent form!



      I used the AlphaSports invoice quantity field [embedded browse]to try this.
      (using v10.5) ~ I'll import my code into v11 tomorrow just for kicks)
      PS: you might want to explicitly declare (dim) vc_value and vn_value....
      Last edited by SNusa; 03-23-2012, 04:20 AM.
      Robert T. ~ "I enjoy manipulating data... just not my data."
      It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
      RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

      Comment


        #78
        Re: Invoicing totals

        Hey Jeff,
        Where in my PM to you did I state that I moved to another product? I wrote that I considered other products, and in my unprofessional opinion I think Alpha is flaky, and perhaps I made a mistake selecting it. However so far I have managed to accomplish what is necessary in my app (with the help of this phenomenal board), and if you check my last post on this subject I did find an answer that worked.

        Comment


          #79
          Re: Invoicing totals

          Updated code placed on browse hidden button "event event" (designed to look like a regular data field on browse)
          (Cleaned up to use .value property instead of .text property)

          This methodology enables the browse to update calculated fields.
          Using this "hidden button" to display & edit the browse field "triggers" a refresh of parentform immediately once data is changed.

          Code:
          this.Set_Viewport_row(row)
          vc_Value=ui_get_number("QUANTITY:","Sold",str(this.quantity[COLOR="#0000CD"].value[/COLOR]),"")
          ' vc_Value=ui_get_number("QUANTITY:","Sold",this:quantity.text,"")  ' <---- Previous line of code used in post #77 above
          
          if vc_value="" then
          	'this:quantity.value=555 ' works when "hidden button" is clicked to set value.
          	end
          end if
          
          vn_value=val(vc_value)
          this:quantity.value = vn_Value
          this.Set_Viewport_row(row)
          	
          if this.Table_Get().Mode_Get() > 0 then '(kind of optional but doesn't hurt)
          	this.Commit()
          end if
          This works like a charm in v.10.5!
          There is a bug in v.11 though (as usual I found it) ~ See post #83 below with the link to an easy fix.
          (until a5 v11 internal code is fixed)
          Last edited by SNusa; 03-26-2012, 12:27 AM.
          Robert T. ~ "I enjoy manipulating data... just not my data."
          It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
          RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

          Comment


            #80
            Re: Invoicing totals

            Originally posted by barry685 View Post
            Hey Jeff,
            Where in my PM to you did I state that I moved to another product? I wrote that I considered other products, and in my unprofessional opinion I think Alpha is flaky, and perhaps I made a mistake selecting it. However so far I have managed to accomplish what is necessary in my app (with the help of this phenomenal board), and if you check my last post on this subject I did find an answer that worked.
            That is now how I read it, sorry for the misunderstanding..

            I'm just distraught that, this is NO different than Lotus, with the workarounds etc..
            other than my lotus works with my alias tables (doesn't look pretty) but hey at least it works

            I want to be able to click a list of past invoice items (as the customers ALWAYS order the same things, different qty and this is with an alias table of the invoice items) and there is another issue - since I can't get my alias tables to show in a browse, I'm not quite sure how in alpha I will accomplish the pricing, each customer has their own pricing for items, and there is also contracts on some of the items. In lotus I had this all done with alias tables bubbling the contract (if within the invoice date) to be the first record of another (hidden) browse window. When you clicked the past invoice item the pricing actually came from that hidden table (alias) first (if a match) otherwise grabbed the last price of invoice
            so my pricing is
            I don't think I can use alpha as the price book is aliased like 4 times
            1 contract pricing (price book)
            2 price from price book (qty breaks sorted by date of price change)
            2 price from price book (items database sorted by date of price change) keeping a history of all prices for a product
            3 price from invoice line
            4 price from entry

            it can probably be done in a dropdown table of some sort, but don't like the popups of tables - I just want a list off to the right

            now can someone figure out this?
            http://msgboard.alphasoftware.com/al...-working/page2

            I'm reading they are working on SOME BUG as this is still in latest 11 (I think it was along the same lines)

            I hibernating for a while..

            Comment


              #81
              Re: Invoicing totals

              Not being too sure what your pricebook contains in both fields and records,
              you can surely have as many re-iterations (aliases) of the pricebook as you describe.
              Each displayed continuously on a form, each for different query purposes-
              by designing the set and the form accordingly.

              Is your reference to "alias join on alphasports invoice - quick n simple - not working" typical of the set you refer to here??

              If Roberts solution is not what you are after, this has gotten too complex to follow. 80 posts, wow.
              How about getting back to basics,
              Provide more detail of this pivotal pricebook or better - sample of the set, form and tables you have , accompanied by a specific question.

              Comment


                #82
                Re: Invoicing totals

                Originally posted by markusof View Post
                .....I'm not quite sure how in alpha I will accomplish the pricing, each customer has their own pricing for items, and there is also contracts on some of the items. In lotus I had this all done with alias tables bubbling the contract (if within the invoice date) to be the first record of another (hidden) browse window. When you clicked the past invoice item the pricing actually came from that hidden table (alias) first (if a match) otherwise grabbed the last price of invoice
                so my pricing is
                I don't think I can use alpha as the price book is aliased like 4 times
                1 contract pricing (price book)
                2 price from price book (qty breaks sorted by date of price change)
                2 price from price book (items database sorted by date of price change) keeping a history of all prices for a product
                3 price from invoice line
                4 price from entry

                it can probably be done in a dropdown table of some sort, but don't like the popups of tables - I just want a list off to the right

                now can someone figure out this?
                http://msgboard.alphasoftware.com/al...-working/page2

                I'm reading they are working on SOME BUG as this is still in latest 11 (I think it was along the same lines)

                I hibernating for a while..
                No pop-ups needed.....
                Use 4 radio buttons with a conditional browse. Change the button, change the browse data shown on form......
                (You'll have 4 one to many relationships set in the invoice header table to accommodate (filter) these four lookup tables.)
                Hint: The embedded browses should each be based on a single table and not a set. (on the many side)
                Add button fields to browse and use event event to store data from "pricing tables" in variables.
                With a few more lines of code you can also automatically add the data and show the info selected into the invoice detail table.
                After setup, 2 clicks. 1 click to select data source, one button click to select billing data. (plus one click to enter quantity sold)
                Robert T. ~ "I enjoy manipulating data... just not my data."
                It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                Comment


                  #83
                  Re: Invoicing totals

                  WARNING: I found yet another bug that will leave inexperienced users scratching their heads trying to implement my code above in version 11...... (it works fine in v.10.5, but v11 is not doing something it should be.) ~It's an easy fix.
                  (the proper "framework" for the browse event event is no longer being generated by a5, and without it, no buttons on an embedded browse will work properly.)

                  http://msgboard.alphasoftware.com/al...l=1#post604887
                  Robert T. ~ "I enjoy manipulating data... just not my data."
                  It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                  RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                  Comment


                    #84
                    Re: Invoicing totals

                    Originally posted by Stan Mathews View Post
                    Same case, not.



                    In the interactive window, table.current() is maningless. You would use

                    tbl = table.open("Inv_hedr")
                    tbl.change_begin()
                    tbl.subtotal = C_subtotal.value
                    tbl.change_end(.T.)
                    tbl.close()

                    The code I gave you was intended for a form based on a set where inv_hedr is the parent, as I specified, so you don't have to open it. Further the onsave event which only fires immediately before the record is saved, thus obviating the need to put the table in change mode.
                    Not necessarily! You can actually specify (set) the IW session from the Interactive Menu heading in a5. Once you select the correct window, table.current() does in fact resolve, and thus has meaning! (Just found this out the other day).....

                    And I think I just found another bug too....

                    Open a layout. (in run mode)
                    Set the correct IW session to this window
                    Enter these lines in (one by one) and they resolve/work:
                    (the form closes)
                    dim vp_form as p = parentform.this
                    vp_form.close()

                    .....But, if you copy and paste both lines into the IW together in one swoop, and highlight both lines of code and select run [lightening bolt] (to run both lines together) they don't work. ~ parentform.this does not resolve and you get an error.
                    Last edited by SNusa; 04-27-2012, 01:05 AM.
                    Robert T. ~ "I enjoy manipulating data... just not my data."
                    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                    Comment

                    Working...
                    X