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.Properties;
|
||||||
import java.util.logging.Level;
|
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.MAccount;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
import org.compiere.model.MConversionRate;
|
import org.compiere.model.MConversionRate;
|
||||||
|
@ -122,6 +129,8 @@ public abstract class Doc
|
||||||
* M_Requisition POR
|
* 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 */
|
/** AR Invoices - ARI */
|
||||||
public static final String DOCTYPE_ARInvoice = MDocType.DOCBASETYPE_ARInvoice;
|
public static final String DOCTYPE_ARInvoice = MDocType.DOCBASETYPE_ARInvoice;
|
||||||
/** AR Credit Memo */
|
/** AR Credit Memo */
|
||||||
|
@ -1729,6 +1738,58 @@ public abstract class Doc
|
||||||
if (ii != null)
|
if (ii != null)
|
||||||
return ii.intValue();
|
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;
|
return 0;
|
||||||
} // getC_DocType_ID
|
} // getC_DocType_ID
|
||||||
|
|
||||||
|
|
|
@ -524,6 +524,26 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
|
||||||
btnCustomize.setDisabled(!enabled);
|
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)
|
public void lock(boolean locked)
|
||||||
{
|
{
|
||||||
this.btnLock.setPressed(locked);
|
this.btnLock.setPressed(locked);
|
||||||
|
|
|
@ -1087,7 +1087,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
{
|
{
|
||||||
ADTabpanel adtab = (ADTabpanel) event.getTarget();
|
ADTabpanel adtab = (ADTabpanel) event.getTarget();
|
||||||
if (adtab == adTabbox.getSelectedTabpanel()) {
|
if (adtab == adTabbox.getSelectedTabpanel()) {
|
||||||
toolbar.enableProcessButton(adtab.getToolbarButtons().size() > 0);
|
toolbar.enableProcessButton(adtab.getToolbarButtons().size() > 0 && !adTabbox.getSelectedGridTab().isNew());
|
||||||
toolbar.dynamicDisplay();
|
toolbar.dynamicDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1277,7 +1277,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
toolbar.lock(adTabbox.getSelectedGridTab().isLocked());
|
toolbar.lock(adTabbox.getSelectedGridTab().isLocked());
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted() && !adTabbox.getSelectedGridTab().isNew());
|
||||||
|
|
||||||
//Deepak-Enabling customize button IDEMPIERE-364
|
//Deepak-Enabling customize button IDEMPIERE-364
|
||||||
if(!(adTabbox.getSelectedTabpanel() instanceof ADSortTab))
|
if(!(adTabbox.getSelectedTabpanel() instanceof ADSortTab))
|
||||||
|
@ -1612,8 +1612,15 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
adTabbox.evaluate(e);
|
adTabbox.evaluate(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted() && !adTabbox.getSelectedGridTab().isNew());
|
boolean isNewRow = adTabbox.getSelectedGridTab().getRowCount() == 0 || adTabbox.getSelectedGridTab().isNew();
|
||||||
toolbar.enableReport(true);
|
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.enableExport(!adTabbox.getSelectedGridTab().isSortTab());
|
||||||
toolbar.enableFileImport(!changed && !adTabbox.getSelectedGridTab().isSortTab() && adTabbox.getSelectedGridTab().isInsertRecord());
|
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());
|
breadCrumb.enableLastNavigation(adTabbox.getSelectedGridTab().getCurrentRow() + 1 < adTabbox.getSelectedGridTab().getRowCount());
|
||||||
toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null);
|
toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null);
|
||||||
toolbar.enableIgnore(true);
|
toolbar.enableIgnore(true);
|
||||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
|
||||||
toolbar.enableReport(true);
|
|
||||||
if (adTabbox.getSelectedGridTab().isSingleRow())
|
if (adTabbox.getSelectedGridTab().isSingleRow())
|
||||||
{
|
{
|
||||||
if (adTabbox.getSelectedTabpanel().isGridView())
|
if (adTabbox.getSelectedTabpanel().isGridView())
|
||||||
|
@ -1862,8 +1867,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
breadCrumb.enableLastNavigation(adTabbox.getSelectedGridTab().getCurrentRow() + 1 < adTabbox.getSelectedGridTab().getRowCount());
|
breadCrumb.enableLastNavigation(adTabbox.getSelectedGridTab().getCurrentRow() + 1 < adTabbox.getSelectedGridTab().getRowCount());
|
||||||
toolbar.enableTabNavigation(false);
|
toolbar.enableTabNavigation(false);
|
||||||
toolbar.enableIgnore(true);
|
toolbar.enableIgnore(true);
|
||||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
|
||||||
toolbar.enableReport(true);
|
|
||||||
if (postCallback != null)
|
if (postCallback != null)
|
||||||
postCallback.onCallback(true);
|
postCallback.onCallback(true);
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,7 @@ public class ProcessModalDialog extends AbstractProcessDialog implements EventLi
|
||||||
dialogContent.setHflex("1");
|
dialogContent.setHflex("1");
|
||||||
dialogContent.setVflex("1");
|
dialogContent.setVflex("1");
|
||||||
dialogContent.setSclass("dialog-content");
|
dialogContent.setSclass("dialog-content");
|
||||||
|
dialogContent.setStyle("overflow-y: auto;");
|
||||||
dialogBody.appendChild(dialogContent);
|
dialogBody.appendChild(dialogContent);
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.setId("message");
|
div.setId("message");
|
||||||
|
|
|
@ -795,6 +795,9 @@ public class ProcessParameterPanel extends Panel implements
|
||||||
editor.setMandatory(mField.isMandatory(true));
|
editor.setMandatory(mField.isMandatory(true));
|
||||||
editor.updateLabelStyle();
|
editor.updateLabelStyle();
|
||||||
}
|
}
|
||||||
|
if (getParent() != null) {
|
||||||
|
getParent().invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -118,7 +118,10 @@ public final class ThemeManager {
|
||||||
MClientInfo cinfo = MClientInfo.get(Env.getCtx());
|
MClientInfo cinfo = MClientInfo.get(Env.getCtx());
|
||||||
if (cinfo.getLogoWeb_ID() > 0) {
|
if (cinfo.getLogoWeb_ID() > 0) {
|
||||||
MImage mImage = MImage.get(Env.getCtx(), cinfo.getLogoWeb_ID());
|
MImage mImage = MImage.get(Env.getCtx(), cinfo.getLogoWeb_ID());
|
||||||
|
if (mImage.getData() != null)
|
||||||
return new AImage(mImage.getName(), mImage.getData());
|
return new AImage(mImage.getName(), mImage.getData());
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
|
||||||
/* Using different approach: ImageEncoder supports only PNG and JPEG
|
/* Using different approach: ImageEncoder supports only PNG and JPEG
|
||||||
Image image = mImage.getImage();
|
Image image = mImage.getImage();
|
||||||
|
|
Loading…
Reference in New Issue