Commit Graph

298 Commits

Author SHA1 Message Date
abijah
4a064df594 Fixed problem with sorting by entries/debits/credits/balance
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@173 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-22 17:43:24 +00:00
abijah
c048d44972 Checking in completely non-working code, as I'm just trying to get a full checkin before the weekend. I cannot yet seem to get the Reconcilation entries to save.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@172 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-19 16:22:28 +00:00
abijah
f6d6659d2a Got rid of the custom paging functions, since it's no longer used, and added a function to convert dates into SQL format. Added a beforeSave callout to Transaction to convert the date before saving.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@171 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-19 16:21:16 +00:00
abijah
19cee7290f Fixed a bug that was leaving unreconciled entries in the list of reconciled entries.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@170 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-19 16:19:18 +00:00
abijah
3c067f6586 While working on payments, commented out the form reset stuff so I don't have to keep reentering the data with every post. Also, changed the customer ID to be passed outside of 'Customer', which appears to cake as a model that needs to be updated. Finally, added a bogus parameter, until I can figure out why the Model::set() function fails to recognize model fields if the first item in the model array is another Model. This bogus field just ensures Model::set uses all the fields, and bogus is ultimately ignored since it's not a member of LedgerEntry.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@169 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-19 16:17:14 +00:00
abijah
f7bcfef665 Added a ledger listing to the Lease view page, which was otherwise quite empty.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@168 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 04:19:17 +00:00
abijah
d06f34de9a Modified Transaction view to use jqGrid for entries. Also fixed a bug in the ledger entries element, since there is no way for credit/debit to be populated without a ledger_id, it makes sense to base the column displays on the presence of ledger_id.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@167 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 04:07:52 +00:00
abijah
d5388e7767 Although I'm not too happy with the modifications, I do have a working version that minimizes the columns need to display ledger entries. The logic feels screwy to me, but I've beat my head on it long enough. I'll move on to something else and come back to it when my head clears.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@166 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 03:57:43 +00:00
abijah
5a88f29600 Modified to prevent stepping on the user's action if already set.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@165 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 03:45:43 +00:00
abijah
8dd64f60bc Fixed a confusion over the usage of the 'opposite' function, which was converting, for example, from 'ASSET' to 'credit'. However, it seemed like it could be used to convert from 'debit' to 'credit', but it didn't work that way. So, I modified it to do so, and made things a bit more robust by making the comparisons case insensitive.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@164 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 03:43:05 +00:00
abijah
de2319e93d Further progress on payment entries. There is an outstanding charges grid, but it doesn't have amounts due to the way I designed the ledger_entries element. I'll do a bit of rework on that next.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@163 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 00:49:40 +00:00
abijah
1fbc452581 Changed the unreconciled transaction list to always include 'debit' or 'credit', even if the user specifically requests one or the other. Handling it as a special case everywhere was bothering me.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@162 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 19:12:22 +00:00
abijah
65acd0e181 Added routines to reconcile a new ledger entry against unreconciled entries. I haven't tested it robustly, but it seems to work on the surface at least.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@161 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 18:40:39 +00:00
abijah
f5bb9bac83 Stopped the debug output when dynamically adding a div
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@160 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 18:39:12 +00:00
abijah
45ae013e99 Removed remnants of the Containable behavior (which we've already put into the application model. Modified the account model to look for all unreconciled transactions, not just those from the current ledger. Added a mechanism to find unreconciled transactions up the chain, including lease and customer.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@159 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 09:00:38 +00:00
abijah
16126b7b6e Fairly decent first pass at determining which ledger entries have not yet been reconciled for an account. I'm using the current ledger only, which I'm sure is not what we want. Since it works though, it's worth checking in.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@158 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 08:32:53 +00:00
abijah
fdd3fe2641 Getting the receipt/payment data in order, getting ready to save (or at least experiment with save.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@157 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 07:38:39 +00:00
abijah
c340c25eee Fixed bug converting PHP strings to javascript when they contain the single quote (') character
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@156 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 07:37:45 +00:00
abijah
b8de98917a More progress on posting payments. Customer selection now works as well as the date picker. At this point, we need to figure out how to insert this data into the database. Of course, significant cleanup is still required, as is beautification.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@155 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 05:17:59 +00:00
abijah
d6c7fbb735 Added a refresh button to every jqGrid. I added a search button too, but I feel like the modal dialog needs to be tweaked to be useful. Oh well, good enough for the moment since it comes for free
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@154 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:55:41 +00:00
abijah
5dd3efa12f Added initial support for ledger entry reconciliation (e.g. matching payments to charges).
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@152 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:40:46 +00:00
abijah
cb02b9e1e0 Further tweaking to the linkable behavior, first by fixing the $efields addition from the last checkin of this file, and second by fixing a problem with linking onto a HABTM relationship, since the alias was coming out screwy (although this issue was hacked by using 'table' to determine the class and alias).
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@151 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:39:27 +00:00
abijah
212c982851 Removed the lengthy and overly verbose URL from the debug output, since it can be easily determined from clicking on the provided link.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@150 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:37:15 +00:00
abijah
0aa94b8fe5 Added a virtual callout for grouping
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@149 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:36:19 +00:00
abijah
76e9b7590f Working version of the Linkable behavior that allows for a HABTM joining table to have an alias specified (thus allowing more than one instance in a query). I don't like the $efields bit though, and will change that on the next checkin. Don't want to lose a working version though!
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@148 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 17:19:07 +00:00
abijah
af405a44d5 Yet another place where Ledger.name was being used.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@147 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 08:38:31 +00:00
abijah
1f9772e926 Fixed bug created when controller was added as an optional parameter to Links
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@146 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 04:48:52 +00:00
abijah
b1a0437117 Removed another instance of using Ledger.name
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@145 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 04:48:17 +00:00
abijah
8db9b90157 Removed another unnecessary field
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@144 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 04:47:38 +00:00
abijah
33b7d3d67d Removed what I believe to be unnecessary fields from the contacts model, since they should be determinable by convention.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@143 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 02:24:39 +00:00
abijah
57c73eafdb Eliminated use of ledger name, since a ledger is just one of the books that make up an account. There is no reason to identify a ledger by a name other than the account name.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@142 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 02:18:05 +00:00
abijah
30b3185473 Added accounts to the ledger entry grids, since it's tough to figure out what's going on without them. This exposed a problem with the controller name automatically being determined in the Links function, so it now looks for an optional controller parameter.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@141 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 23:22:38 +00:00
abijah
e9dd1366bc Further work on the linkable behavior, since it wasn't working right with aliases. It doesn't help matters that models are instantiated from the model associations with their own alias. Thus, the priority of a tables alias is 1) 'alias' as defined in the 'link' structure'; 2) alias member of the model instance; 3) class name of the model instance. I may need to revisit this work later, since while typing these comments I managed to enlighten myself on the alias scheme. But it does seem to work for now.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@140 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 23:06:27 +00:00
abijah
7ee461d993 Added monetary source into the ledger entry lists. This may be more information than is needed on the listing, but I'll take it out later if so.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@139 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:52:38 +00:00
abijah
365b2295af Added an element for monetary_sources. Not sure if it will get used, but it was easy enough to do.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@138 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:45:07 +00:00
abijah
dfb0d90246 Moved map listings to jqGrid, and fixed cut/paste error in the comments of the transactions controller.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@137 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:34:35 +00:00
abijah
af32d88605 Moved transaction listings to jqGrid, and fixed a bug in the jqGrid element wrt. comment columns
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@136 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:24:42 +00:00
abijah
c9c06a9fb4 Updated all the view.ctp files to use the new style infobox. I should probably create an element for it, but I'll hold off for now.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@135 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:01:22 +00:00
abijah
c3139220ee Moved the ledger_entries controller/view to jqGrid.
Changed the app controller jqGrid virtual functions for getting the tables for both count and the full query.  The ExtraTables bit was too confusing, and was only intended to allow the user to specify a subset for count and augment it for full query.  This is easily accomplished by having DataTables just call DataCountTables first... one line solution ends the confusion.

Modified linkable behavior to support a %{MODEL_ALIAS} tag, which is replaced in the relationship conditions at runtime with the actual model alias.  This is experimental at best, and certainly will create a problem for any model that ends up using the conditions in 'contain' instead of 'link'.

Broke the LedgerEntry->findInLedgerContext function out into multiple pieces, so those same pieces could be used in the LedgerEntries controller to populate jqGrid.

Changed the ledger_entries element, as a special case, to also allow listing control from ledger_id and account_type, instead of idlist as a mechanism for populating the grid.

Changed the infobox summary css, which will break several pages until I rework them.

Some next steps include fixing the broken infoboxes, and changing the transactions view to use the ledger_entries element.  This also means the ledger_entries element will need to add support for idlist, or if we have any credit/debit issues, perhaps another custom transaction_id instead.



git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@134 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 19:41:20 +00:00
abijah
68273302cb Removed the useless pagination code from ledger_entries
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@133 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 06:46:05 +00:00
abijah
abd45244e1 Changed account to split the table requests into two parts.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@132 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 06:31:21 +00:00
abijah
e3b838d62a Moved ledgers over the jqGrid. Working reasonably well at the moment.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@131 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 06:22:38 +00:00
abijah
5fd7483ac1 Updated accounts to use jqGrid.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@130 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 04:15:55 +00:00
abijah
274ed13644 Fixed an issue with debug output when including more than one grid on a page.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@129 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 04:15:35 +00:00
abijah
4537174873 Added mechanism to easily create links in the listing grids. I'm not very keen on how it works, but it's good enough for the moment, unless/until I figure out how to push this to the view. If it should stay in the controller, I'm sure a more sophisticated mechanism will be required.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@128 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 02:50:21 +00:00
abijah
3c5a31aaff Added debug mechanism to help track grid loading problems. It will obviously need to be taken out at some point, but I'll wait until things are working well enough.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@127 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 02:48:58 +00:00
abijah
fd155aaaeb Moved the pagination objects to the right side instead of centered. Also, replaced the jQuery function call for the pager parameter to just the id text. I found this in the manual, and it saves us from having to use the --special exception.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@126 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 00:44:40 +00:00
abijah
284765e06a I apparently forgot to check the pmgr_jqGrid.js file in a few checkins ago, meaning those revisions are all broken. This is finally the checkin to include it.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@125 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 00:13:57 +00:00
abijah
352e3487cc Minor tweak to the css to create a margin for each grid, and so added a div to wrap each item listing. Changed the search boxes to only be available for the overall item listing.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@124 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 23:54:48 +00:00
abijah
b02695631e Moved all of the jqGrid search javascript into its own file to prevent duplication when including more than one grid on a page. I also put search boxes directly into the jqGrid element, with the requested fields passed in as a parameter. I've got the autosearch mechanism tied across all grids, but search and reload is grid specific. This was mostly to get the code into an extensible spot, but the layout is not yet desirable. I'll yank the search boxes on the next checkin not that its proven out.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@123 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 23:16:35 +00:00