hg merge release-2.1 (merge release2.1 into development)

This commit is contained in:
Carlos Ruiz 2015-10-07 08:39:12 -05:00
commit bbb4d42d46
6 changed files with 20 additions and 4 deletions

View File

@ -196,12 +196,12 @@ public class BankStatementPayment extends SvrProcess
payment.setPayAmt(PayAmt);
else // payment is likely to be negative
payment.setPayAmt(PayAmt.negate());
payment.setOverUnderAmt(invoice.getGrandTotal(true).subtract(payment.getPayAmt()));
payment.setOverUnderAmt(invoice.getOpenAmt().subtract(payment.getPayAmt()));
}
else // set Pay Amout from Invoice
{
payment.setC_Currency_ID(invoice.getC_Currency_ID());
payment.setPayAmt(invoice.getGrandTotal(true));
payment.setPayAmt(invoice.getOpenAmt());
}
}
else if (C_BPartner_ID != 0)

View File

@ -97,7 +97,7 @@ public class RollUpCosts extends SvrProcess {
{
StringBuilder sql = new StringBuilder("SELECT M_ProductBOM_ID FROM M_Product_BOM WHERE M_Product_ID = ? ")
.append(" AND AD_Client_ID = ").append(client_id);
int[] prodbomids = DB.getIDsEx(get_TrxName(), sql.toString(), client_id);
int[] prodbomids = DB.getIDsEx(get_TrxName(), sql.toString(), p_id);
for (int prodbomid : prodbomids) {
if ( !processed.contains(p_id)) {

View File

@ -93,11 +93,12 @@ public class AttachmentFileSystem implements IAttachmentStore {
in.transferTo(0, in.size(), out);
in.close();
out.close();
/* IDEMPIERE-2864
if(entryFile.exists()){
if(!entryFile.delete()){
entryFile.deleteOnExit();
}
}
}*/
entryFile = destFile;
} catch (IOException e) {

View File

@ -235,6 +235,13 @@ public class AlertProcessor extends AdempiereServer
Collection<Integer> users = alert.getRecipientUsers();
int countMail = notifyUsers(users, alert.getAlertSubject(), message.toString(), attachments);
// IDEMPIERE-2864
for(File attachment : attachments)
{
if(attachment.exists() && !attachment.delete())
attachment.deleteOnExit();
}
m_summary.append(alert.getName()).append(" (EMails+Notes=").append(countMail).append(") - ");
return valid;
} // processAlert

View File

@ -292,6 +292,13 @@ public class Scheduler extends AdempiereServer
}
}
// IDEMPIERE-2864
for(File file : fileList)
{
if(file.exists() && !file.delete())
file.deleteOnExit();
}
}
return pi.getSummary();

View File

@ -253,6 +253,7 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
fieldAcctSchema.setValue(MClient.get(Env.getCtx()).getAcctSchema().getC_AcctSchema_ID());
fieldAcctSchema.addValueChangeListener(this);
m_C_AcctSchema_ID = (Integer)fieldAcctSchema.getValue();
Env.setContext(Env.getCtx(), form.getWindowNo(), "C_AcctSchema_ID", m_C_AcctSchema_ID);
// Organization
AD_Column_ID = FactReconcile.col_AD_Org_ID; //C_Period.AD_Org_ID (needed to allow org 0)