yayasoft / ytour

ytour
2 stars 0 forks source link

when opening voucher popup in docket the dockect hasChanges state is changed #258

Closed novice3030 closed 9 years ago

novice3030 commented 9 years ago
  1. open docket 1882
  2. open the voucher from accounting tab
  3. we didn't change anything but still docket has changes

image

DamirHaibullin commented 9 years ago

For this situation when open the voucher popUp in VoucherPopUpController call function init(). In this function line(964) calling function updateTotalVCHR(totalVCHRAmount). In this function we have next codes: $scope.order.SaleAccountingInfo.TotalVCHR += amount; $scope.order.CostAccountingInfo.TotalVCHR += amount; The $scope.order is breeze object then we saw state - changed in docket.

novice3030 commented 9 years ago

Good find @damir26 This bug is actually should be fixed be me. To fix this I think we should move that logic to the server side when creating the voucher. After we come back from the server with success we should make sure that the client side entities are also updated with the correct data

novice3030 commented 9 years ago

I resolved but still didn't commit or closed because more testing should be made