From 00583fcd0a0dfbae72ad08cae1ce8ad0b7815ce8 Mon Sep 17 00:00:00 2001 From: beckf Date: Mon, 1 Nov 2021 20:01:39 -0400 Subject: [PATCH] added progress bar to export --- main.py | 12 + .../qt-lightspeed-pos-vc-connector.pro.qtds | 233 ++++++++++++++++++ 2 files changed, 245 insertions(+) create mode 100644 qt-lightspeed-pos-vc-connector/qt-lightspeed-pos-vc-connector.pro.qtds diff --git a/main.py b/main.py index 2e84a85..85b9301 100644 --- a/main.py +++ b/main.py @@ -658,7 +658,16 @@ def export_charge_balance(self): saleline_export_data.append(f) + # Determine each increment for progress bar. + increment = 100 / len(salelines['Sale']) + total_increment = 0 + for i in salelines['Sale']: + + # increment the progress bar. + total_increment = total_increment + increment + self.ui.progressBar.setValue(int(total_increment)) + # Does this invoice have a payment that is on account. on_account = False @@ -904,6 +913,9 @@ def export_charge_balance(self): self.debug_append_log("Failed to export CSV balance data.", "window,info") return None + # Finish of progress bar + self.ui.progressBar.setValue(int(100)) + def clear_account_balances(self, customerID, balance, paymentID, creditAccountID, emp_id): try: formatted_request = { diff --git a/qt-lightspeed-pos-vc-connector/qt-lightspeed-pos-vc-connector.pro.qtds b/qt-lightspeed-pos-vc-connector/qt-lightspeed-pos-vc-connector.pro.qtds new file mode 100644 index 0000000..3a31549 --- /dev/null +++ b/qt-lightspeed-pos-vc-connector/qt-lightspeed-pos-vc-connector.pro.qtds @@ -0,0 +1,233 @@ + + + + + + EnvironmentId + {0038c54a-14a0-4324-86c6-60d4afdf2f20} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + Desktop + {8994bd34-5ed9-4c45-8c0a-94c8f33eca4a} + 0 + 0 + 0 + + 0 + C:\Users\fbeck\PycharmProjects\lightspeed-vc-connector\build-qt-lightspeed-pos-vc-connector-Desktop-Debug + C:/Users/fbeck/PycharmProjects/lightspeed-vc-connector/build-qt-lightspeed-pos-vc-connector-Desktop-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:\Users\fbeck\PycharmProjects\lightspeed-vc-connector\build-qt-lightspeed-pos-vc-connector-Desktop-Release + C:/Users/fbeck/PycharmProjects/lightspeed-vc-connector/build-qt-lightspeed-pos-vc-connector-Desktop-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + C:\Users\fbeck\PycharmProjects\lightspeed-vc-connector\build-qt-lightspeed-pos-vc-connector-Desktop-Profile + C:/Users/fbeck/PycharmProjects/lightspeed-vc-connector/build-qt-lightspeed-pos-vc-connector-Desktop-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + false + false + 1000 + + true + + 2 + + ProjectExplorer.CustomExecutableRunConfiguration + + false + true + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + +