Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resetting Global Variables?
#9
I will explain as best I can (please ask if still I am missing something).

We have a main DB. All of the information I have is directly from the Database. I then turn the information into invoices that are importable to quickbooks. All the data is already pre-loaded into a CSV format which is then used for each dictionary.

1. I pull all of our sales from the previous day (either pyodbc or MS Access).

2. Each sale has multiple items retaining a separate row for each item. Therefore, I could be dealing with a total of 10 rows for a single sale because the sale has multiple items.

3. Each sale can either have customer ID's associated with them or not.

4. Each sale can either have an Account associated with it or not

5. Each sale can have either an adjusted or reversed sale linked to the actual sale. (so a single sale can extend to about 50 rows because of 2 extra sales that are associated with that sale; this leads to a column titled 'ACUTALSALEID' that I use from the DB to contrast which sales have multiple sales associated with them)

With these sales, I have to locate all the necessary information to convert each sale into an importable invoice layout which is where the dictionaries come in.

Customers themselves have their own table in our DB. I export and convert this table in a dictionary to be used with the information from the sales.

Customer Accounts are also in their own table in our DB. I also have to export and convert our Accounts list to a dictionary to quickly be called using the Customers information(i.e. using the Customer ID as the dictionary key for Customer Accounts).

To work with, on average, 1k to 10k sales, it seems to be more convenient to place all the back-end data (Customer info, Account info, etc) into a dictionary to quickly be called based on the information provided for each sale.

I hope this makes sense and apologies if not.
Reply


Messages In This Thread
Resetting Global Variables? - by WuchaDoin - Sep-28-2018, 03:12 PM
RE: Resetting Global Variables? - by micseydel - Sep-28-2018, 04:31 PM
RE: Resetting Global Variables? - by WuchaDoin - Sep-28-2018, 04:35 PM
RE: Resetting Global Variables? - by ichabod801 - Sep-28-2018, 05:14 PM
RE: Resetting Global Variables? - by WuchaDoin - Sep-28-2018, 05:20 PM
RE: Resetting Global Variables? - by nilamo - Sep-28-2018, 06:41 PM
RE: Resetting Global Variables? - by WuchaDoin - Sep-28-2018, 06:59 PM
RE: Resetting Global Variables? - by nilamo - Sep-28-2018, 07:09 PM
RE: Resetting Global Variables? - by WuchaDoin - Sep-28-2018, 07:50 PM
RE: Resetting Global Variables? - by ichabod801 - Sep-28-2018, 08:34 PM
RE: Resetting Global Variables? - by WuchaDoin - Sep-28-2018, 08:41 PM
RE: Resetting Global Variables? - by volcano63 - Sep-28-2018, 08:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand global variables 357mag 5 1,144 May-12-2023, 04:16 PM
Last Post: deanhystad
  Global variables or local accessible caslor 4 1,041 Jan-27-2023, 05:32 PM
Last Post: caslor
  global variables HeinKurz 3 1,162 Jan-17-2023, 06:58 PM
Last Post: HeinKurz
  Clarity on global variables JonWayn 2 962 Nov-26-2022, 12:10 PM
Last Post: JonWayn
  resetting an iterator to full Skaperen 7 7,010 Feb-20-2022, 11:11 PM
Last Post: Skaperen
  variables vcnt, ocnt, and mcnt adding previous values and not resetting to 0 archanut 2 1,953 Feb-12-2021, 06:56 PM
Last Post: deanhystad
  Global variables not working hobbyist 9 4,754 Jan-16-2021, 03:17 PM
Last Post: jefsummers
  Global vs. Local Variables Davy_Jones_XIV 4 2,675 Jan-06-2021, 10:22 PM
Last Post: Davy_Jones_XIV
  Global - local variables Motorhomer14 11 4,282 Dec-17-2020, 06:40 PM
Last Post: Motorhomer14
  Question regarding local and global variables donmerch 12 5,130 Apr-12-2020, 03:58 PM
Last Post: TomToad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020