Inventory Tutorial

penfold88

New member
ive been following the inventory tutorial however i need to make a change due to us using a barcode system i need the products box on movement page to be typable however i get this error

[08] Error: during query execution. INSERT INTO `movements` (`id_product`, `type`, `quantity`) VALUES ('CPS.TEST', 'Inbound', '50')
The DBMS server said: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'CPS.TEST' for column `stock`.`movements`.`id_product` at row 1

Not sure what ive done wrong here are the screenshots of the back office anyone able to point me in the right direction to turn it from a dropdown box to the sku input field i need

kind regards
 

Attachments

  • form .png
    form .png
    55.9 KB · Views: 1
  • products.png
    products.png
    39.5 KB · Views: 1
  • movements.png
    movements.png
    29.1 KB · Views: 1

eugenio

Administrator
Staff member
You should change movements.id_product to short text in data and to textbox in form configurator.
However, this doesn't make much sense because you lose the relationship with the products table, users can type any product code (even not valid).
 

penfold88

New member
Thanks that worked.

can anyone help me with a small question / guide as im a no coder

on my products & warehouse page i have a locations field A1 A2 etc is there a way that i can add locations or remove locations from a product without clearing the whole list ? the locations have their own database

im assuming it is similar to the sum query but im not sure and dont want to mess up my working app
 
Last edited:

eugenio

Administrator
Staff member
Thanks that worked.

can anyone help me with a small question / guide as im a no coder

on my products & warehouse page i have a locations field A1 A2 etc is there a way that i can add locations or remove locations from a product without clearing the whole list ? the locations have their own database

im assuming it is similar to the sum query but im not sure and dont want to mess up my working app

Hi,
the question is not clear. If you have a locations table you can have a id_location (or any field name you like) lookup field in your products table that refers to the locations table, exactly as the other lookup fields that you probably already have in your application. I don't know what you mean with clearing the whole list.
 

penfold88

New member
Hi sorry i will try and explain with pictures

On the stock Movements Page i would like a field that pulls the Locations information from products with ability to remove or add a location.

then i would like to show the current locations on Warehouse (Stock on hand)

for example i pick the last item "AIR VENT" from A1 i can then remove A1 from "AIR VENT" but leave A2 & A3 selected as there is still stock on those locations

if i could figure this out it would make our app so much better
 

Attachments

  • products.PNG
    products.PNG
    29.1 KB · Views: 1
  • stock movements.PNG
    stock movements.PNG
    14.4 KB · Views: 1
  • warehouse.PNG
    warehouse.PNG
    61.1 KB · Views: 1
Top