Вот, что есть в методе InventUpd_Estimated.updateFieldsChange
PHP код:
...
fromInventDim = InventDim::find(inventTrans.inventDimId);
toInventDim.data(fromInventDim);
if (inventTrans.transChildType == movement.transChildType() &&
inventTrans.transChildRefId == movement.transChildRefId())
{
if ((inventTrans.inventDimId != movement.inventDimId() && movement.inventDimId() != movement_Orig.inventDimId()))
{// если изменились аналитики, копируем их
toInventDim.mergeUsedDim(movement.dimSearch(),movement.dimGroupId(),movement.inventdim());
toInventDim = InventDim::findOrCreate(toInventDim);
}
}
...
А вот InventDim.mergeUsedDim
PHP код:
void mergeUsedDim(InventDimSearch _dimSearch,
InventDimGroupId _dimGroupId,
InventDim _fromInventDim
)
{
Integer x;
if (_dimSearch.first(_dimGroupId))
do
{
x = _dimSearch.dimFieldId();
if (_dimSearch.dimActive() && _fromInventDim.(x)) // Вот ОНА! проверка на пустое значение
{
this.(x) = _fromInventDim.(x);
}
} while (_dimSearch.next(_dimGroupId));
// HF21_394
if (this.WMSLocationId && !this.WMSLocation())
{
this.WMSLocationId = '';
}
}
Что с этим делать думайте сами