When adding in POS interface some product by alternate SKU (based on attributes) the model field of uc_order contains the main SKU. I think due to this issue we have the second one - there is no adjustments in stock level for products with alternate SKU.

CommentFileSizeAuthor
#2 uberpos-700642-2.patch3.24 KBslip

Comments

jon_stewart’s picture

Subscribing (and was just about to post same)

I installed the Jan 23 Dev version on drupal 6.15. No stock was updated until I configured the two conditional actions mentioned elsewhere. Stock level is correctly incremented and decremented, both voided and cancelled orders.

However, no stock with attributes have stock levels adjusted. This applies to items of type 'Product' with an attribute, and also to product classes with attributes (one or more) which form part of the class (and hence are copied to the instance of the product class).

We're trying to go live at the moment, so this is definitely critical for us.

EDIT: Just checking there in the order details for an attributed item, and uberpos is using the base SKU (which we suffix with an 'XX' )not the alternative (correct) one, and hence no altering stock (of the base sku).

(We have ranges of ceramics, identical except for the printed design, hence displaying the currect sku is important!)

On a positive note: You guys have really got this sorted in so many ways. It's excellent and smooth to use, and I've enough confidence that we're sourcing a receipt printer. I have a feature request I must post!

Thanks for all the hard work, guys
Jon

slip’s picture

Title: working with alternate (attributes) SKU's » No adjustments in stock level for products with alternate SKU.
Status: Active » Needs review
StatusFileSize
new3.24 KB

Here's some code that maxcpr wrote up and I turned into a patch. Please try it out and let me know if it solves your problem. Our company actually doesn't use attributes, so somebody testing this out for me would be helpful.

jon_stewart’s picture

I'll test it and let you know.
Thanks
Jon

jon_stewart’s picture

Priority: Critical » Minor

Informally tested

#1
I item with no attributes. Correctly decremented stock. Correctly incremented stock when item voided

#2
1 item with 1 attribute. Again correct as above

#3
1 item with 1 attribute, 1 item with no attribute, entered in either order. Correct as above for both.

#4
1 item with no attribute, 1 item with 1 attribute, 1 item with 2 attributes. Correct as above for all three.

Congrats to the patcher and slip. This appears to work!

Thanks and sorry I missed finding that patch myself (I'm assuming it's documented somewhere)
Jon

PS I've just noticed that in the admin section of the orders (ie when you view an UberPOS order, the new stock level in the database is correct, but the comment always indicates the stock levels have been reduced, even when the product has been voided (or cancelled, I believe) from the order.

'The stock level for edcapcott has been decreased to 3.' - Item scanned into UberPOS
'The stock level for edcapcott has been increased to 2.' - Item was voided from UberPOS.

As I say, the actual database has had stock level CORRECTLY altered, so no panic. Is there a 'minus' being used where there should be a 'plus'?

Not sure if this is UberPOS inserting this text, or Ubercart.

Thanks again!

maxcpr’s picture

Please pay attention, that in this code besides SKU exists some other changes, may be not necessary in your case:
- changed date format on recept
- barcode function call adopted to 2.x branсh (i'v feeling it won't work with 1.x barcode)
- added some "div's" for my custom receipt css

to slip: sorry for not making patch myself.. i really have no time now..

slip’s picture

right, thanks for the note maxcpr. I should have pointed that out.

slip’s picture

Status: Needs review » Closed (fixed)

I applied a modified patch, but it should be good. Let me know if there are still issues with this one.