diff --git a/apps/app-gd-movement/app.json b/apps/app-gd-movement/app.json index 1aae17644..1e6c5b44c 100644 --- a/apps/app-gd-movement/app.json +++ b/apps/app-gd-movement/app.json @@ -2,7 +2,7 @@ "expo": { "name": "GDMN Склад", "slug": "gdmn-gd-movement", - "version": "1.6.8", + "version": "1.6.9", "githubUrl": "https://github.com/stasgm/gdmn-mob", "orientation": "default", "icon": "./assets/icon.png", @@ -26,7 +26,7 @@ "android": { "package": "com.gsbelarus.gdmovement", "permissions": ["CAMERA", "VIBRATE"], - "versionCode": 35 + "versionCode": 36 }, "web": { "favicon": "./assets/favicon.png" diff --git a/apps/app-gd-movement/src/screens/Doc/DocEditScreen.tsx b/apps/app-gd-movement/src/screens/Doc/DocEditScreen.tsx index 6e20083b2..bd0aff20d 100644 --- a/apps/app-gd-movement/src/screens/Doc/DocEditScreen.tsx +++ b/apps/app-gd-movement/src/screens/Doc/DocEditScreen.tsx @@ -346,7 +346,7 @@ export const DocEditScreen = () => { useEffect(() => { //Если меняем тип документа и для поля Откуда есть подразделение по умолчанию - if (docFromContactType) { + if ((docFromContactType && !doc) || (docFromContactType && oldDocTypeId)) { dispatch( appActions.setFormParams({ fromContact: @@ -354,7 +354,7 @@ export const DocEditScreen = () => { }), ); } - }, [dispatch, docDocumentType, defaultFromDepartment, docFromContactType]); + }, [dispatch, docDocumentType, defaultFromDepartment, docFromContactType, doc, oldDocTypeId]); const handlePresentType = () => { if (isBlocked) { diff --git a/apps/app-gd-movement/src/screens/Doc/components/DocLine.tsx b/apps/app-gd-movement/src/screens/Doc/components/DocLine.tsx index 4da24f8c1..2237ec891 100644 --- a/apps/app-gd-movement/src/screens/Doc/components/DocLine.tsx +++ b/apps/app-gd-movement/src/screens/Doc/components/DocLine.tsx @@ -143,9 +143,9 @@ export const DocLine = ({ item, isSumWNds, onSetLine, onSetDisabledSave }: IProp const validNumber = new RegExp(/^(\d{1,6}(,|.))?\d{0,4}$/); const q = validNumber.test(newValue) ? newValue : isQuantity ? keypadValue.quantity : keypadValue.sumWNds; setKeypadValue(getValue(keypadValue, q)); - onSetLine(getValue(keypadValue, parseFloat(q || '0'))); + onSetLine(getValue({ ...item, keypadValue }, parseFloat(q || '0'))); }, - [isKeyboardOpen, isQuantity, keypadValue, getValue, onSetLine], + [isKeyboardOpen, isQuantity, keypadValue, getValue, onSetLine, item], ); const handleChangeQuantity = useCallback(() => {