vo.setDocTypeDOC01(ApplicationConsts.SALE_CREDIT_NOTE_DOC_TYPE);
vo.setDocStateDOC01(ApplicationConsts.OPENED);
// pre-set warehouse code if previously defined (stored in SYS19 table...)
ClientApplet applet = ( (ApplicationClientFacade) MDIFrame.getInstance().getClientFacade()).getMainClass();
ButtonCompanyAuthorizations bca = applet.getAuthorizations().getCompanyBa();
final ArrayList companiesList = bca.getCompaniesList("DOC01_CREDITNOTES");
if (companiesList.size()>0) {
HashMap map = new HashMap();
// retrieve default warehouse...
map.put(ApplicationConsts.COMPANY_CODE_SYS01,companiesList.get(0));
map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.WAREHOUSE_CODE);