Selaa lähdekoodia

开票申请新增转手工开票功能,点击后弹出确认对话框,确认无误后,将当前单据类型由"自动"转为"手工",并关闭当前应用,同时开启手工历史发票应用。

沈静伟 4 vuotta sitten
vanhempi
commit
790463a586

+ 5 - 0
src/apps/tinvoiceapply/tinvoiceapply.java

@@ -180,6 +180,7 @@ public class tinvoiceapply extends PaoCust {
         }
     }
 
+
     public void check(boolean ischeck) throws P2Exception {
         if (ischeck) {
             if ("ÊÖ¹¤".equalsIgnoreCase(getString("ftype"))) {
@@ -383,4 +384,8 @@ public class tinvoiceapply extends PaoCust {
             }
         }
     }
+
+    public void changetype() throws P2Exception {
+        setValue("ftype", "ÊÖ¹¤", 11L);
+    }
 }

+ 24 - 0
src/apps/tinvoiceapply/tinvoiceapplyAppBean.java

@@ -39,6 +39,7 @@ public class tinvoiceapplyAppBean extends AppBeanCust {
         byrefresh();
         return 1;
     }
+
     @Override
     public int UNCHECK() throws P2Exception {
         this.SAVE();
@@ -49,4 +50,27 @@ public class tinvoiceapplyAppBean extends AppBeanCust {
         byrefresh();
         return 1;
     }
+
+    /**
+     * 自动发票转手工发票
+     *
+     * @return
+     * @throws P2Exception
+     */
+    public int CHANGETYPE() throws P2Exception {
+        if (msgDialogIsNotOpen()) {
+            msgDialogOpen("确定将当前发票申请转手工历史发票?");
+        }
+        if (msgDialogIsCheckOk()) {
+            tinvoiceapply tinvoiceapply = (tinvoiceapply) getPao();
+            tinvoiceapply.changetype();
+            long id = tinvoiceapply.getUniqueIDValue();
+            this.save();
+            closeApp(this.appName);
+            closeApp("invoiceold");
+            openApp("invoiceold", id);
+        }
+        byrefresh();
+        return 1;
+    }
 }