java右划线转移_导入/复制机会转移一行

在自定义产品网格中,自定义字段的行在自定义网站的一行向下移动 .

Background :

我们有一个自定义,它在 Headers 中提供单位边距和% . PXFormula用于DAC,用于任何依赖于计算 .

Opportunity Products有4个附加领域:

上次成本= InventoryItem的最后成本

总成本=数量*最后成本

Margin = ExtAmt - ExtCost

手动成本,一个允许手动覆盖上次成本的复选框

机会有2个增加的领域:

保证金总额=保证金总和

保证金%=保证金总额/销售总额

Problem :

自定义机会存在问题,当从现有商机复制记录或导入Excel文件时,行会移动一行 .

现有记录

XKI2Z.png

复制/粘贴或从Excel导入后

RsZGT.png

Code :

我目前的代码:

public PXSelect

Where

Equal>>> Cost;

protected void CROpportunityProducts_RowInserting(PXCache cache,

PXRowInsertingEventArgs e, PXRowInserting InvokeBaseHandler)

{

if(InvokeBaseHandler != null)

InvokeBaseHandler(cache, e);

var row = (CROpportunityProducts)e.Row;

if (row == null) return;

var rowExt = cache.GetExtension(row);

if (rowExt == null) return;

var cost = Cost.SelectSingle();

if (cache.GetValue(row, "usrManCost") == null) return;

if (cost != null && (bool)cache.GetValue(row, "usrManCost") == false)

{

cache.SetValueExt(row, cost.LastCost);

}

}

可能是什么导致了这个?我认为RowInserting事件为第一行返回0,因为PXSelect <>语句返回0,因为在下一行之前,InventoryItem不在缓存中 .

我想出的一个可能的解决方案是使用RowInserted . 这解决了使用复制/粘贴时的问题 . 但是,它会导致从Excel导入错误计算总保证金 .

划线处完成SampleApp工程应用层初始化函数代码的注释(用中文简述各段代码)。 void SampleApp_Init( uint8 task_id ) { SampleApp_TaskID = task_id; SampleApp_NwkState = DEV_INIT; SampleApp_TransID = 0; // #if defined ( BUILD_ALL_DEVICES ) // The "Demo" target is setup to have BUILD_ALL_DEVICES and HOLD_AUTO_START // We are looking at a jumper (defined in SampleAppHw.c) to be jumpered // together - if they are - we will start up a coordinator. Otherwise, the device will start as a router. if ( readCoordinatorJumper() ) zgDeviceLogicalType = ZG_DEVICETYPE_COORDINATOR; else zgDeviceLogicalType = ZG_DEVICETYPE_ROUTER; #endif // BUILD_ALL_DEVICES // #if defined ( HOLD_AUTO_START ) // HOLD_AUTO_START is a compile option that will surpress ZDApp // from starting the device and wait for the application to start the device. ZDOInitDevice(0); #endif // SampleApp_Periodic_DstAddr.addrMode = (afAddrMode_t)AddrBroadcast; SampleApp_Periodic_DstAddr.endPoint = SAMPLEAPP_ENDPOINT; SampleApp_Periodic_DstAddr.addr.shortAddr = 0xFFFF; // SampleApp_Flash_DstAddr.addrMode = (afAddrMode_t)afAddrGroup; SampleApp_Flash_DstAddr.endPoint = SAMPLEAPP_ENDPOINT; SampleApp_Flash_DstAddr.addr.shortAddr = SAMPLEAPP_FLASH_GROUP; // SampleApp_epDesc.endPoint = SAMPLEAPP_ENDPOINT; SampleApp_epDesc.task_id = &SampleApp_TaskID; SampleApp_epDesc.simpleDesc=(SimpleDescriptionFormat_t *)&SampleApp_SimpleDesc; SampleApp_epDesc.latencyReq = noLatencyReqs; // Register the endpoint description with the AF afRegister( &SampleApp_epDesc ); // Register for all key events - This app will handle all key events RegisterForKeys( SampleApp_TaskID ); // By default, all devices start out in Group 1 SampleApp_Group.ID = 0x0001; osal_memcpy( SampleApp_Group.name, "Group 1", 7 ); aps_AddGroup( SAMPLEAPP_ENDPOINT, &SampleApp_Group ); }
最新发布
06-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值