Inventory Image Set or Not  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Inventory Image Set or Not

Postby SBarnes » Sun Jul 29, 2018 11:18 pm

Is there a way to tell whether or not an inventory items image has been set?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Inventory Image Set or Not

Postby Ernst » Mon Jul 30, 2018 9:17 am

This works for me.. I pick up the StaticPicture Variable in Save end, and export the image to a png file.

AddHandler inventoryForm.Inventory.PropertyChanged, AddressOf Inventory_PropertyChanged

Private Sub Inventory_PropertyChanged(sender As Object, e As System.ComponentModel.PropertyChangedEventArgs)
' Dim inventory As JiwaInventory.Inventory = sender

If e.PropertyName = "Picture" Then
StaticPicture = "P"
End If
End Sub
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Inventory Image Set or Not  Topic is solved

Postby Mike.Sheen » Mon Jul 30, 2018 10:15 am

SBarnes wrote:Is there a way to tell whether or not an inventory items image has been set?


Hi Stuart,

In 7.1 and onwards the picture will be null in both the business logic property and the table IN_Main if it has not been set. If it is null, the UI will display a default picture which comes from the SystemSettings.DefaultPicture property of the inventory business logic.

Prior to 7.1 (07.00.175.00 and earlier) I'm not sure if you could tell if it had been set, as we used to set the picture to be the default inside the business logic - so it transparently always got set to a value even if never set. We realised that was pretty silly, especially when integrating with other systems like web stores, hence the change to leave it as null if never set.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 15 guests

cron