In Roommate App 1.0 (Bahoy), Celebrex overnight, Celebrex forum, I set up two accounts per roommate pair. Each roommate had an "account payable" and an "account receivable", Celebrex reviews, Buy Celebrex without a prescription, for another roommate. These two accounts switched names when you looked at them from the perspective of the other roommate, Celebrex For Sale. When Roommate A split a bill and created a debt of $100 for Roommate B, Celebrex duration, Where can i cheapest Celebrex online, it would increase Roommate A's account receivable by $100. Then the system would check Roommate A's account payable (a.k.a Roommate B's account receivable), Celebrex blogs, Celebrex pictures, and if there was a balance of say $50 in that account (meaning Roommate A owed Roommate B $50), it would find the difference between the two accounts and store $50 in Roommate A's account receivable, buy Celebrex from mexico, Celebrex interactions, and $0 in the account payable. Thereby balancing the two accounts, online Celebrex without a prescription. Buy Celebrex without prescription, When accessing that data, the system would check both accounts to find which had the balance, Celebrex class, Celebrex natural, and adjust the sign (positive or negative) depending on which account for which roommate the balance was in. Celebrex For Sale, This is fun right?!.
For the zero people still reading this, buy Celebrex from canada, Celebrex brand name, you may be wondering why you couldn't just use one account. Well, online buying Celebrex hcl, Is Celebrex addictive, you can, but here's the issue, canada, mexico, india. Purchase Celebrex, In the accounts table in the database, you would have one account between two roommates, Celebrex wiki, Where can i buy Celebrex online, with 3 fields: The account balance, Roommate A, where can i buy cheapest Celebrex online, Celebrex maximum dosage, and Roommate B. In Roommate App, order Celebrex from United States pharmacy, Buy no prescription Celebrex online, there is no naturally dominant roommate, so the first issue you have to solve is which roommate is A and which is B, fast shipping Celebrex. In this latest rebuild, I actually decided to try this, and defined A as the roommate with the lowest user_id (each roommate has a unique user ID number to help the system keep track of them), Celebrex For Sale. Celebrex from canadian pharmacy, So now how it works is when a bill is paid, it compares the roommates' IDs, Celebrex without a prescription, Celebrex price, finds the right account, and either increases or decreases the balance accordingly, buy cheap Celebrex. Celebrex schedule, The reason I didn't go with this method originally is that the ID comparison feels unnatural and dirty to me. One of the biggest issues with this method comes from if I ever want to show a list of all accounts for all other roommates, my Celebrex experience. What is Celebrex, I can't just ask the database for "all accounts", I have to ask for "all accounts where Roommate A = this_roommate or Roommate B = this_roommate", and then do all the ID comparisons again to figure out the right totals. Celebrex For Sale, With the first way I still had to access two accounts, but I already new exactly which account was which.
So now that I'm down to -1 people still reading this (which means even I'm not reading this anymore), I think I've found the solution. The first way was originally inspired by business accounting practices, with all the accounts receivable/payable stuff, but I wasn't smart enough to take that inspiration as far as I needed to. If I had just analyzed the double-entry journal a little more, I could have saved myself all this work (and you the pain of reading this). The new plan is to go back to two accounts. Both accounts will be "accounts receivable" for their respective roommates, but this time those accounts will not double as "accounts payable" for the other roommate, Celebrex For Sale. Instead, any time a debt or payment is made, the system will update both accounts. So one account will always be the opposite sign (positive or negative) as the other (except for zero of course). What this allows is for any time I have to get the account balance, I can just look at the current roommate's account receivable, and I don't have to do any calculation to find out which roommate is which, or to find out which of two accounts holds the balance. Awesome. Celebrex For Sale, One trick here is having to make those two updates when any transaction is made, but all that requires is flipping the sign and applying it to the other account. Pretty easy actually. The other trick is making sure the two balances stay exactly the opposite amount. If they ever became un-opposite (yeah that's what I said), that would be really really bad...really. In theory that shouldn't be hard to do, but fun things like database errors make it a slight possibility that I'll have to protect against.
Holy crap that was a long post, Celebrex For Sale. And the only people that will probably get anything out of it are my future competitors. Maybe I'll at least get some SEO love out of it because of all the times I said "roommates". Roommates, Roommates, Roommates. I love Google. Celebrex For Sale, Google, Google, Google. :) Polyphasic sleep does weird things to the brain.
I'll update this once I've had a chance to test out my new solution. If you get anything out of this let me know. Or even better, link to it. With roommates in the link text. :D
Similar posts: Topamax For Sale. Retin-A For Sale. Buy Celebrex Without Prescription. Flagyl For Sale. Buy Flagyl Without Prescription. Topamax treatment. Get Flagyl. Amoxicillin forum. Zithromax australia, uk, us, usa. Discount Clomid.
Trackbacks from: Celebrex For Sale. Celebrex For Sale. Triamterene For Sale. Flagyl For Sale. Modalert For Sale. Atenolol photos. Celebrex from canada. Buy Vibramycin from canada. Flonase price. Amoxicillin use.