abijah
b780ebeb3e
Added stats summary to the top level for lease. For consistency, I want all stats to be summarized at the top.
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@175 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-22 17:55:32 +00:00
abijah
117e31af69
Due to the way we're adding in stats for each lease as a separate query, there isn't presently a way to sort by balance. Therefore I've disabled sorting on that column, which can be revisited if we reduce the grid down to a single SQL query.
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@174 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-22 17:46:49 +00:00
abijah
28b3f35318
Fixed problem with sorting by entries/debits/credits/balance
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@173 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-22 17:43:24 +00:00
abijah
2b8a525718
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@172 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-19 16:22:28 +00:00
abijah
dc6e399fea
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@171 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-19 16:21:16 +00:00
abijah
1508f963d3
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@170 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-19 16:19:18 +00:00
abijah
3270ad9bf0
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@169 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-19 16:17:14 +00:00
abijah
febd216810
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@168 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 04:19:17 +00:00
abijah
c8b781804a
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@167 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 04:07:52 +00:00
abijah
3e5ac64108
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@166 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 03:57:43 +00:00
abijah
9b6830468e
Modified to prevent stepping on the user's action if already set.
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@165 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 03:45:43 +00:00
abijah
063aec6c3c
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@164 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 03:43:05 +00:00
abijah
a2ae522b2d
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@163 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-18 00:49:40 +00:00
abijah
ba218fbeeb
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@162 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 19:12:22 +00:00
abijah
2e67695154
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@161 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 18:40:39 +00:00
abijah
a136fd5313
Stopped the debug output when dynamically adding a div
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@160 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 18:39:12 +00:00
abijah
1e3774cad6
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@159 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 09:00:38 +00:00
abijah
518f7836ac
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@158 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 08:32:53 +00:00
abijah
416e230da8
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@157 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 07:38:39 +00:00
abijah
cd416ea5fa
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@156 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 07:37:45 +00:00
abijah
001b156333
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@155 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-17 05:17:59 +00:00
abijah
df1e0daafd
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@154 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:55:41 +00:00
abijah
9331b0a412
Should have checked this as part of the last commit (r152), since it is the DB schema changes necessary to support the reconciliation work. Also, the sitelink script was modified to match.
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@153 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:47:57 +00:00
abijah
fae90c3fa9
Added initial support for ledger entry reconciliation (e.g. matching payments to charges).
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@152 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:40:46 +00:00
abijah
a83edef049
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@151 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:39:27 +00:00
abijah
4ada3d5bac
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@150 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:37:15 +00:00
abijah
ede1053de4
Added a virtual callout for grouping
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@149 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 21:36:19 +00:00
abijah
ce9142ffe2
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@148 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 17:19:07 +00:00
abijah
0270e5ea89
Yet another place where Ledger.name was being used.
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@147 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 08:38:31 +00:00
abijah
4d2b4779d4
Fixed bug created when controller was added as an optional parameter to Links
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@146 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 04:48:52 +00:00
abijah
fe7d7c6b0f
Removed another instance of using Ledger.name
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@145 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 04:48:17 +00:00
abijah
435b0614b2
Removed another unnecessary field
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@144 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 04:47:38 +00:00
abijah
708910870c
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@143 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 02:24:39 +00:00
abijah
8b067bf676
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@142 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-16 02:18:05 +00:00
abijah
388dbc0540
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@141 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 23:22:38 +00:00
abijah
ce20a44836
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@140 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 23:06:27 +00:00
abijah
1495bb3373
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@139 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:52:38 +00:00
abijah
eaea52a862
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@138 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:45:07 +00:00
abijah
271207629b
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@137 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:34:35 +00:00
abijah
edca01f98c
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@136 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:24:42 +00:00
abijah
23f4a29fc7
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@135 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:01:22 +00:00
abijah
543e2daa43
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@134 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 19:41:20 +00:00
abijah
3911b3303f
Removed the useless pagination code from ledger_entries
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@133 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 06:46:05 +00:00
abijah
d859cb4dee
Changed account to split the table requests into two parts.
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@132 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 06:31:21 +00:00
abijah
39071b39fb
Moved ledgers over the jqGrid. Working reasonably well at the moment.
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@131 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 06:22:38 +00:00
abijah
3dcdcb03eb
Updated accounts to use jqGrid.
...
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@130 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 04:15:55 +00:00
abijah
41636f5c75
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@129 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 04:15:35 +00:00
abijah
1890a0490e
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@128 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 02:50:21 +00:00
abijah
2b9369b823
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@127 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 02:48:58 +00:00
abijah
4ec3db7b58
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@126 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 00:44:40 +00:00