remove Purchase lines ordering by item no - erp

I have the page of purchase order. In this pages I have a page included with lines, the purchase lines
The problem I'm facing is in each order i'm making the purchase lines are being sorted by item no, and it's a mess when I want to persist a order of my products and check each one and don't want to alter it's order understand? So in my both cases no order was the best scenario.
I have a lot of keys in the purchase lines table, but for the purchase order at the moment i don't have anything in "SourceTableView". What can I do? In the images below you can see the same product in different lines.

the PK for the Purchase Line in Standard NAV is Document Type,Document No.,Line No. so your List Page should show the lines in the correct order if the Key in the SourceTableView is empty.
However if your lines are still out of order there should be some code in the OnOpePage trigger.
Cheers

Related

Vaadin grid user column re-ordering and saving per user

How do people tend to let users re-order the grid columns and save that ordering for later?
The only way I can think of to do it, at least in Vaadin 7, is:
Listen for column re-ordering via addColumnReorderListener(…)
When re-order triggered, if user initiated, get columns from getColumns() and save to DB with any identifying information
When pull Grid back up, read grid ordering from DB and apply the same order with setColumnOrder(columns)
So is there a better way to do this? I just checked the Directory, could not find anything obvious to make this easier. Just looking for how others have addressed this user requirement. If Vaadin 14 already supports such actions a little easier, that would be good to know as well, as it might give me some ideas on how to get that ability short term before I can upgrade to Vaadin 14.
For a more customizable grid you can (in addition to what you've already done) add a button that opens a dialog that lists all possible columnnames, together with a checkbox.
Unchecking the checkbox removes the column, checking the checkbox adds the column.
Even more comfortable is when the dialog lists all available columns in a Grid with draggable rows and editable checkboxes, so that the user can show, hide and sort all columns in one place. After that you have to reorder all columns by calling grid.setColumnOrder.
Just so people know how I solved this issue, based on the comments:
When load data into Grid, first check database for columns of this Grid/user combination. If find such a column order, call setColumnOrder(userColumns).
Added 2 buttons to top, one to save column order, one to reset it.
"Save" button only enabled after moving at least one column.
"Reset" button only enabled if at least one column was moved. One column was moved either because of the DB, or because user JUST moved a column.
On save, save to DB. On reset, clear from DB, and reset Grid to original column order.
We chose not to save the column order each time they changed the order, directly in the addColumnReorderListener, because we realized sometimes users might move columns around temporarily, and one really want to save that column order for the future. That said, the saving inside the addColumnReorderListener worked well.
We don't currently need to save the column sizes, as suggested by #Simon Martinelli, but we are keeping it as an idea for the future. I fully expect it would work.

Google Spreadsheet Re order Columns

I'll explain an example of the situation before I ask the question.
If I have a pile of 5 numbered boxes and I scan them into a spreadsheet in the following order. 4,2,3,5,1
I copy that list into another program which adds more info to each number (which is what I want) but messes up the order. So now it is 3A,4D,1C,2B,5E.
Is there a formula I can use to reorder my new list to the original? I want to keep the original order as I print labels for these boxes and this would keep the order, meaning ordering both numerically won't work.
Thanks,
Graeme
I'd recommend an HLookup. Look for the character in your original list and add "*" which is a wild card for the second character.
Assumptions:
The first character is unique in the set.
Each value is in its own cell.
The original list is retained after intermediate program runs.

How to offer parameter for user to select an amt and then show that data

I have done report that shows summary of sales of items by free shipping or not free shipping. They are actually Product lines, that get free shipping or not.
It looks like this.
date Invoice# Free PL NOt free PL etc.
061113 1234 $29
061213 5678 $89
They want to have the flexibility to select ranges of BOTH free PL’s and non-free PL’s (e.g., “free PL’s over $70 and non-free over $30”, or “free PL’’s over $80 and non-free PL’s over $25” etc.)
They want to specify I guess in the param what amount then the CR should display according, so that in out case here only the second line would show.
Is this able to be done just in the param? if so, how would you code this?
this method may be a bit lengthy but will work for you hopefully.
make a table named PL history, now give it three fields, with ID, PL_DATE and PL_RATE, you need to insert new record in to that daily. if you want it to be more finer, add another column as PL_TIME as well. now when inserting the PL_Transaction, make sure that you enter time to that table as well.
Once it is done, make a view and like the transaction table with the respective PL_DATE and PL_TIME if you incorporate time, this will ensure that you pick the right PL specified during the transaction. YOu can do it behind the generate report button, will take no time to execute.
JUst call that view to the report, and get your specific PL using the formulas,
I tried calling a field to the report mannualy, it did come to the report, but it could not be called to the formula editor so , I thought of this solution , may help. thanks

Automatically updating Data Validation lists based on user input

I have a very large data set (about 16k rows). I have 10 higher level blocks and within each block I have 4 categories (10 rows for each) which use Data Validation lists to show items available in each category. The lists should automatically update based on user input. What I need your help with is that I want to use the same data set for each block and preferably a least calculation/size intensive approach. I have put together a sample file that outlines the issue with examples.
Sample File
Thank you for your help in advance.
Okay, I've found something, but it can be quite time consuming to do.
Select each range of cells. For instance, for the first one, select B3:B18 and right click on the selection. Find 'Name a Range..." and give it the name "_FIN_CNY". Repeat for all the other ranges, changing the name where necessary.
Select the first range of cells to get the data validation, and click on "Data validation", pick the option "Allow: List" (you already have it) and then in the source, put the formula:
=INDIRECT($G$4&"_CNY")
$G$4 is where the user will input. This changes as you change blocks.
_CNY is the category. Change it to _CNY2 for the second category.
Click "OK" and this should be it. Repeat for the other categories.
I have put an updated file on dropbox where you can see I already did it for the data of _FIN for categories CNY, CNY2 and INT and did the one for _GER as well. You'll notice the category of INT for _GER doesn't work, that's because the Named Range _GER_INT doesn't exist yet.

Quickbooks: Adding a negative value to an invoice using the QBDSK

Is there any way to add a line item containing a negative amount to an existing invoice?
I'm using QBSDK7 and QB Enterprise. (and if it matters .Net 3.5)
What we're attempting to do is automate the way we're creating invoices. We're already pulling in employee's time and applying it to the correct invoices, but when we go to add credits (just a negative amount on a line item on the invoice) using
InvoiceLineMod.Amount.SetValue(-1234)
it fails with the error "Transaction must be positive"
I've also tried adding a Service Item with a negative amount and giving it a positive quantity and I get the same result.
This seems like such a no-brainer as we have been doing this manually for the last 10 years. I'm guessing there is artificial restriction on this.
Some things to consider:
Credit Memos are no good as we need to display exact details of the reduction on the same page.
We don't have payments to apply yet in most cases.
This need to be done before any retainers are applied.
Any help would be greatly appreciated.
Can you show the complete code you're using to modify the invoice? Can you also show the exact error message you're getting?
It is possible, though to do you need to make sure that you're using a Discount Item as your ItemRef type (a Service Item will not work), and you need to make sure that the transaction as a whole is for a positive amount.
Sometimes our app has to adjust an invoice down with a negative number. I have been able to add negative line items using the following code. I have to set a quantity and a rate, instead of setting the amount.
IInvoiceLineAdd ila = ia.ORInvoiceLineAddList.Append().InvoiceLineAdd;
ila.ItemRef.ListID.SetValue(GetQBID(JobKey));
ila.Desc.SetValue("Adjustment");
ila.Quantity.SetValue(1);
ila.ORRatePriceLevel.Rate.SetValue(-1.00);
Quickbooks doesn't allow you to post an invoice with a negative balance. If you try to do it through the UI, it prompts you to create a credit memo instead. (And vice-versa if you try it with a credit memo.)
You can enter negative quantities and/or prices into the line items, but the total of the invoice has to be >= 0 or it won't post (i.e., add other line items that offset the negative amounts).
The solution is to use credit memos. Your client-side processing will be more complicated, but it's the only choice with Quickbooks.

Resources