‎2018 Mar 05 12:47 PM - edited ‎2024 Feb 04 3:47 AM
As far as i know i can extend a function by using @pluginAt if i used a POSITION = Before i can trigger a function just before the target function.
So what i want to do is to use this way so i can edit the bar code readed from the bar code reader before it goes to the database but, still i don't know which function or which class is responsible for fetching data from database.
***************
TEST CASE : Bar code readed : 1234567890
Item Real Bar Code : 1234567
Quantity : 890
i just need to change the barcode from 1234567890 to 1234567 before searching in the database.
******************
And if i am going the wrong way please tell me
Request clarification before answering.
Hi everyone,
We are trying to read an Item from the database using MaterialManager but it sends us an error when executed in the console.
Thanks
@PluginAt(method="updateSalesItemTypeMaterial",pluginClass=ISalesI
temManager.class,where=POSITION.AFTER)
public void updateSalesItem(Object proxy, Object[] args,
Object ret, StackTraceElement caller) throws
InconsistentReceiptStateException {
logger.info("@PluginAt public void");
SalesItemEntity salesItem = (SalesItemEntity)args[0];
MaterialEntity mat = salesItem.getMaterial();(This is the poblem)
(We need to get this information from articles)
MaterialManager matMgr = (MaterialManager)proxy;
SalesItemEntity sie = new SalesItemEntity();
sie.setDescription(mat.getDescription());
sie.setTaxRateTypeCode(mat.getTaxRateTypeCode());
sie.setQuantityTypeCode(mat.getDefaultQuantityTypeCode());
sie.setPriceListId(receipt.getPriceListId());ERROR

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.