litzvi / avc-beta

trying to build first demo for avc
0 stars 0 forks source link

Change shipping, inventoryUse as relocation #540

Closed litzvi closed 3 years ago

litzvi commented 3 years ago
litzvi commented 3 years ago

enforce loading production functionality

litzvi commented 3 years ago

I changed the used items in loading to storage moves. Need to run this file on cloud date (will only work if you import data only).

VERSION_8_CHANGES.zip

ask me for a ready backup if you need.

litzvi commented 3 years ago

later when we see everything works fine we need to consider inventory use - not now.

mei309 commented 3 years ago

I changed the used items in loading to storage moves. Need to run this file on cloud date (will only work if you import data only).

VERSION_8_CHANGES.zip

ask me for a ready backup if you need.

share with me the backup because the cloud one doesn't work for me

litzvi commented 3 years ago

Dump20210714 (1).zip

litzvi commented 3 years ago

By the way, when changing shipping from used to moves, don't forget to add the following for every line in the loading details (in relocation you don't show them) item po code, supplier, last process date. and remove the new warehouse column.

mei309 commented 3 years ago

done

litzvi commented 3 years ago

This is about the class com.avc.mis.beta.entities.process.InventoryUse (nothing to do with using ingridients in production).

I changed it, so it's a relocation (same as loading) and has storageMoveGroups instead of usedItemGroups. don't forget

litzvi commented 3 years ago

If you are running it on an existing database, then you can run this. VERSION_9_CHANGES.zip

mei309 commented 3 years ago

2021-07-29 00:50:54.027 ERROR 12060 --- [nio-8080-exec-7] o.h.engine.jdbc.spi.SqlExceptionHelper : Cannot add or update a child row: a foreign key constraint fails (ebdb.inventory_uses, CONSTRAINT FKape7yn6jnuhjq7m9mwkvqmn73 FOREIGN KEY (process_id) REFERENCES transaction_processes (process_id)) 2021-07-29 00:50:54.036 ERROR 12060 --- [nio-8080-exec-7] com.avc.mis.beta.ExceptionControler : Exception :

java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (ebdb.inventory_uses, CONSTRAINT FKape7yn6jnuhjq7m9mwkvqmn73 FOREIGN KEY (process_id) REFERENCES transaction_processes (process_id)) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) ~[mysql-connector-java-8.0.20.jar:8.0.20] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.20.jar:8.0.20] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.20.jar:8.0.20] at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql-connector-java-8.0.20.jar:8.0.20] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092) ~[mysql-connector-java-8.0.20.jar:8.0.20] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040) ~[mysql-connector-java-8.0.20.jar:8.0.20] at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347) ~[mysql-connector-java-8.0.20.jar:8.0.20] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025) ~[mysql-connector-java-8.0.20.jar:8.0.20] at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-3.4.5.jar:na] at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-3.4.5.jar:na] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final] at org.hibernate.pe

mei309 commented 3 years ago

you know whats this?

litzvi commented 3 years ago

Yes it's because you are using old database where inventory use is a transaction process.

litzvi commented 3 years ago

If you are running it on an existing database, then you can run this. VERSION_9_CHANGES.zip

if you are running the cloud backup, you need to run this first.

mei309 commented 3 years ago

I ran it

mei309 commented 3 years ago

I will try again tonight

litzvi commented 3 years ago

I ran it

you need to run it on the old db with the old data. You can't mix a new db with old data

mei309 commented 3 years ago

im doing exactly that and its not working

litzvi commented 3 years ago

It's working by me. So you need to write exactly when it's happening.

On Fri, Jul 30, 2021, 04:19 mei309 @.***> wrote:

im doing exactly that and its not working

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/litzvi/avc-beta/issues/540#issuecomment-889467242, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMZHF3CY7UMLXHNUVSDH3O3T2HAW7ANCNFSM5AF446PQ .

litzvi commented 3 years ago

Cloud_20210802.zip

this is a ready dump you can use

mei309 commented 3 years ago

for some reason numberAvailableUnits is always null in material usage

litzvi commented 3 years ago

I see it's showing. You aren't showing it in edit but it is there (in F12).

mei309 commented 3 years ago

ok done