|
|
@@ -55,12 +55,16 @@ public class sainvoiceAppBean extends AppBeanCust {
|
|
|
this.SAVE();
|
|
|
byrefresh();
|
|
|
if (!parameter.isdebug) {
|
|
|
- boolean issuccess = new UploadDataToERP(sainvoice, getPaoSet().getUserInfo()).upload();
|
|
|
- if (!issuccess) {
|
|
|
- ((PaoSet) getPaoSet()).addWarning(new P2AppException("", "上传ERP失败,当前单据将自动反复核,请检查!"));
|
|
|
- UNRECHECK();
|
|
|
- } else {
|
|
|
+ if (sainvoice.getString("siteid").equalsIgnoreCase("tz") && sainvoice.getPaoSet("SAORDER").getPao(0).getString("FTYPE").equals("工具借出单")) {
|
|
|
sainvoice.sendmail();
|
|
|
+ } else {
|
|
|
+ boolean issuccess = new UploadDataToERP(sainvoice, getPaoSet().getUserInfo()).upload();
|
|
|
+ if (!issuccess) {
|
|
|
+ ((PaoSet) getPaoSet()).addWarning(new P2AppException("", "上传ERP失败,当前单据将自动反复核,请检查!"));
|
|
|
+ UNRECHECK();
|
|
|
+ } else {
|
|
|
+ sainvoice.sendmail();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return super.RECHECK();
|