hg merge release-2.0 (merge release2 into development)
This commit is contained in:
commit
4142a422d7
|
@ -28,6 +28,13 @@ import java.util.Iterator;
|
|||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.I_C_AllocationHdr;
|
||||
import org.compiere.model.I_C_BankStatement;
|
||||
import org.compiere.model.I_C_Cash;
|
||||
import org.compiere.model.I_C_ProjectIssue;
|
||||
import org.compiere.model.I_M_MatchInv;
|
||||
import org.compiere.model.I_M_MatchPO;
|
||||
import org.compiere.model.I_M_Production;
|
||||
import org.compiere.model.MAccount;
|
||||
import org.compiere.model.MAcctSchema;
|
||||
import org.compiere.model.MConversionRate;
|
||||
|
@ -122,6 +129,8 @@ public abstract class Doc
|
|||
* M_Requisition POR
|
||||
**************************************************************************/
|
||||
|
||||
private static final String DOC_TYPE_BY_DOC_BASE_TYPE_SQL = "SELECT C_DocType_ID FROM C_DocType WHERE AD_Client_ID=? AND DocBaseType=? AND IsActive='Y'";
|
||||
|
||||
/** AR Invoices - ARI */
|
||||
public static final String DOCTYPE_ARInvoice = MDocType.DOCBASETYPE_ARInvoice;
|
||||
/** AR Credit Memo */
|
||||
|
@ -1729,6 +1738,58 @@ public abstract class Doc
|
|||
if (ii != null)
|
||||
return ii.intValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_po.get_TableName().equals(I_M_MatchPO.Table_Name))
|
||||
{
|
||||
int docTypeId = DB.getSQLValue((String)null, DOC_TYPE_BY_DOC_BASE_TYPE_SQL,
|
||||
p_po.getAD_Client_ID(), Doc.DOCTYPE_MatMatchPO);
|
||||
if (docTypeId > 0)
|
||||
return docTypeId;
|
||||
}
|
||||
else if (p_po.get_TableName().equals(I_M_MatchInv.Table_Name))
|
||||
{
|
||||
int docTypeId = DB.getSQLValue((String)null, DOC_TYPE_BY_DOC_BASE_TYPE_SQL,
|
||||
p_po.getAD_Client_ID(), Doc.DOCTYPE_MatMatchInv);
|
||||
if (docTypeId > 0)
|
||||
return docTypeId;
|
||||
}
|
||||
else if (p_po.get_TableName().equals(I_C_AllocationHdr.Table_Name))
|
||||
{
|
||||
int docTypeId = DB.getSQLValue((String)null, DOC_TYPE_BY_DOC_BASE_TYPE_SQL,
|
||||
p_po.getAD_Client_ID(), Doc.DOCTYPE_Allocation);
|
||||
if (docTypeId > 0)
|
||||
return docTypeId;
|
||||
}
|
||||
else if (p_po.get_TableName().equals(I_C_BankStatement.Table_Name))
|
||||
{
|
||||
int docTypeId = DB.getSQLValue((String)null, DOC_TYPE_BY_DOC_BASE_TYPE_SQL,
|
||||
p_po.getAD_Client_ID(), Doc.DOCTYPE_BankStatement);
|
||||
if (docTypeId > 0)
|
||||
return docTypeId;
|
||||
}
|
||||
else if (p_po.get_TableName().equals(I_C_Cash.Table_Name))
|
||||
{
|
||||
int docTypeId = DB.getSQLValue((String)null, DOC_TYPE_BY_DOC_BASE_TYPE_SQL,
|
||||
p_po.getAD_Client_ID(), Doc.DOCTYPE_CashJournal);
|
||||
if (docTypeId > 0)
|
||||
return docTypeId;
|
||||
}
|
||||
else if (p_po.get_TableName().equals(I_C_ProjectIssue.Table_Name))
|
||||
{
|
||||
int docTypeId = DB.getSQLValue((String)null, DOC_TYPE_BY_DOC_BASE_TYPE_SQL,
|
||||
p_po.getAD_Client_ID(), Doc.DOCTYPE_ProjectIssue);
|
||||
if (docTypeId > 0)
|
||||
return docTypeId;
|
||||
}
|
||||
else if (p_po.get_TableName().equals(I_M_Production.Table_Name))
|
||||
{
|
||||
int docTypeId = DB.getSQLValue((String)null, DOC_TYPE_BY_DOC_BASE_TYPE_SQL,
|
||||
p_po.getAD_Client_ID(), Doc.DOCTYPE_MatProduction);
|
||||
if (docTypeId > 0)
|
||||
return docTypeId;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} // getC_DocType_ID
|
||||
|
||||
|
|
|
@ -523,6 +523,26 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
|
|||
{
|
||||
btnCustomize.setDisabled(!enabled);
|
||||
}
|
||||
|
||||
public void enableArchive(boolean enabled)
|
||||
{
|
||||
btnArchive.setDisabled(!enabled);
|
||||
}
|
||||
|
||||
public void enableZoomAcross(boolean enabled)
|
||||
{
|
||||
btnZoomAcross.setDisabled(!enabled);
|
||||
}
|
||||
|
||||
public void enableActiveWorkflows(boolean enabled)
|
||||
{
|
||||
btnActiveWorkflows.setDisabled(!enabled);
|
||||
}
|
||||
|
||||
public void enableRequests(boolean enabled)
|
||||
{
|
||||
btnRequests.setDisabled(!enabled);
|
||||
}
|
||||
|
||||
public void lock(boolean locked)
|
||||
{
|
||||
|
|
|
@ -1087,7 +1087,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
{
|
||||
ADTabpanel adtab = (ADTabpanel) event.getTarget();
|
||||
if (adtab == adTabbox.getSelectedTabpanel()) {
|
||||
toolbar.enableProcessButton(adtab.getToolbarButtons().size() > 0);
|
||||
toolbar.enableProcessButton(adtab.getToolbarButtons().size() > 0 && !adTabbox.getSelectedGridTab().isNew());
|
||||
toolbar.dynamicDisplay();
|
||||
}
|
||||
}
|
||||
|
@ -1277,7 +1277,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
toolbar.lock(adTabbox.getSelectedGridTab().isLocked());
|
||||
}
|
||||
|
||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted() && !adTabbox.getSelectedGridTab().isNew());
|
||||
|
||||
//Deepak-Enabling customize button IDEMPIERE-364
|
||||
if(!(adTabbox.getSelectedTabpanel() instanceof ADSortTab))
|
||||
|
@ -1612,8 +1612,15 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
adTabbox.evaluate(e);
|
||||
}
|
||||
|
||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted() && !adTabbox.getSelectedGridTab().isNew());
|
||||
toolbar.enableReport(true);
|
||||
boolean isNewRow = adTabbox.getSelectedGridTab().getRowCount() == 0 || adTabbox.getSelectedGridTab().isNew();
|
||||
toolbar.enableProcessButton(!isNewRow);
|
||||
toolbar.enableArchive(!isNewRow);
|
||||
toolbar.enableZoomAcross(!isNewRow);
|
||||
toolbar.enableActiveWorkflows(!isNewRow);
|
||||
toolbar.enableRequests(!isNewRow);
|
||||
|
||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted() && !isNewRow);
|
||||
toolbar.enableReport(!isNewRow);
|
||||
toolbar.enableExport(!adTabbox.getSelectedGridTab().isSortTab());
|
||||
toolbar.enableFileImport(!changed && !adTabbox.getSelectedGridTab().isSortTab() && adTabbox.getSelectedGridTab().isInsertRecord());
|
||||
|
||||
|
@ -1781,8 +1788,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
breadCrumb.enableLastNavigation(adTabbox.getSelectedGridTab().getCurrentRow() + 1 < adTabbox.getSelectedGridTab().getRowCount());
|
||||
toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null);
|
||||
toolbar.enableIgnore(true);
|
||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
||||
toolbar.enableReport(true);
|
||||
if (adTabbox.getSelectedGridTab().isSingleRow())
|
||||
{
|
||||
if (adTabbox.getSelectedTabpanel().isGridView())
|
||||
|
@ -1862,8 +1867,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
breadCrumb.enableLastNavigation(adTabbox.getSelectedGridTab().getCurrentRow() + 1 < adTabbox.getSelectedGridTab().getRowCount());
|
||||
toolbar.enableTabNavigation(false);
|
||||
toolbar.enableIgnore(true);
|
||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
||||
toolbar.enableReport(true);
|
||||
if (postCallback != null)
|
||||
postCallback.onCallback(true);
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@ public class ProcessModalDialog extends AbstractProcessDialog implements EventLi
|
|||
dialogContent.setHflex("1");
|
||||
dialogContent.setVflex("1");
|
||||
dialogContent.setSclass("dialog-content");
|
||||
dialogContent.setStyle("overflow-y: auto;");
|
||||
dialogBody.appendChild(dialogContent);
|
||||
Div div = new Div();
|
||||
div.setId("message");
|
||||
|
|
|
@ -795,6 +795,9 @@ public class ProcessParameterPanel extends Panel implements
|
|||
editor.setMandatory(mField.isMandatory(true));
|
||||
editor.updateLabelStyle();
|
||||
}
|
||||
if (getParent() != null) {
|
||||
getParent().invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -117,8 +117,11 @@ public final class ThemeManager {
|
|||
public static org.zkoss.image.Image getClientWebLogo() throws IOException {
|
||||
MClientInfo cinfo = MClientInfo.get(Env.getCtx());
|
||||
if (cinfo.getLogoWeb_ID() > 0) {
|
||||
MImage mImage = MImage.get(Env.getCtx(), cinfo.getLogoWeb_ID());
|
||||
return new AImage(mImage.getName(), mImage.getData());
|
||||
MImage mImage = MImage.get(Env.getCtx(), cinfo.getLogoWeb_ID());
|
||||
if (mImage.getData() != null)
|
||||
return new AImage(mImage.getName(), mImage.getData());
|
||||
else
|
||||
return null;
|
||||
|
||||
/* Using different approach: ImageEncoder supports only PNG and JPEG
|
||||
Image image = mImage.getImage();
|
||||
|
|
Loading…
Reference in New Issue