public class InvoiceUIPlugin extends ScmUIPluginBase {
public void beforeButtonClicked(ButtonObject bo, SCMUIContext ctx) throws BusinessException {
if (bo.getCode().equals("参照对账单")) {
String userInfo=XHFXUIDataCache.getUserLinkedCorpType(ClientEnvironment.getInstance().getUser().getPrimaryKey());
String pk_corp = userInfo.substring(1);
if (!pk_corp.equals(ClientEnvironment.getInstance().getCorporation().getPrimaryKey())) {
throw new BusinessException("非本公司业务员不能参照对账单做发票");
}
if (((InvoiceUI)ctx.getToftPanel()).getCurPanelMode() == 1) {
// 切换到卡片
((InvoiceUI)ctx.getToftPanel()).shiftShowModeTo(0);
}
getCheckBillQueryDlg(ctx).showModal();
}
}
}