Commit Graph

155 Commits

Author SHA1 Message Date
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
abijah
9f876b78de 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@125 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 00:13:57 +00:00
abijah
31c603c757 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@124 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 23:54:48 +00:00
abijah
4d49ad6516 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@123 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 23:16:35 +00:00
abijah
015e6b082d Fixed a bug in which jqGrid would fetch data from the current controller, not the controller responsible for populating the data. Added the ability to fetch data based strictly off of an ID list, which is useful for lists that are embedded in other pages, where the list conditions are entirely foreign to the controller responsible for providing the data. To assist with this one jqGrid virtual function needed the model added as a parameter, so I added it to them all and modified the jqGrid functions in the existing derived controllers. Right now the elements (such as contacts.ctp, the only working one) receive a full list of data to populate themselves. I could have simply taken this and passed it directly to jqGrid, with no need for further server interaction. However, this could result in some very large lists, and although pagination will ensure the user is not overwhelmed, the connection or the browser could be. Unless we have a strong performance need, I'll keep it this way. In the meantime, I'll leave the underlying data available to each element, in case I have to switch over. When all is proven out, I can simplify all the queries such that the extra data is never requested in the first place.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@122 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 22:05:44 +00:00
abijah
cdec4c3301 Moved the phpVarToJavascript function into our FormatHelper. It isn't really the ideal place for it, but I don't want to create a new helper (at least, not yet)
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@121 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 20:36:38 +00:00
abijah
404323c6c1 Moved contacts onto jqgrid. Added 'name' and 'longname' formats.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@120 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 20:24:36 +00:00
abijah
d5dbabd94a Fixed trivial spelling error in one comment block
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@119 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 20:12:52 +00:00
abijah
c90830d41a Made the app controller include the action by default. Added virtual callouts for data order and limit. Changed fields to use formatting, including a custom format for currency and id. Added a function for auto conversion from PHP variables to javascript. Fixed some minor bugs in the controllers already converted to jqGrid. Moved leases onto jqGrid.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@118 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 19:50:09 +00:00
abijah
f6ca79d1a9 Moved units onto jqGrid. Also generalized the jqGridSetup (now jqGridView) function and moved it into the app controller.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@117 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 05:33:30 +00:00
abijah
5fab94011b Fixed minor issue where an empty query could continue to persist.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@116 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 05:14:36 +00:00
abijah
af2d5c38f3 Moved all the jqGrid logic into a separate element, in anticipation of moving all lists to jqGrid
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@115 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 05:04:41 +00:00
abijah
6b8d05f2a0 Yanked the multicolumn toolbar, and returned to my simple text boxes. I will probably end up going with these search boxes, or the modal box (perhaps with autosearch) if I can't come up with a better idea.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@114 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 04:40:47 +00:00
abijah
336ec3b643 Got the mulitcolumn search toolbar in place, but it's not working. First I haven't managed to get an autosearch working (searching as you type). Second, and much more critically, I don't have the controller correctly responding to search terms, as it was implemented rather poorly. I'm moving on for now.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@113 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 03:22:53 +00:00
abijah
b4d640f7c2 Testing implementation of an autosearch functionality, which works. Probably wasted, as I suspect I can get this directly out of jqGrid
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@112 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 01:27:58 +00:00
abijah
90a16c721e Split the jqGrid code out a bit further, giving the application controller full responsibility for handling the jqGrid requests. Virtual functions have been added to allow a derived controller to customize this action as needed.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@111 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 00:53:08 +00:00
abijah
e7b4b21328 Moved all the vendor css & js code into webroot. Although it technically was working fine, cake apparently steps on the fact that the file doesn't change between requests, leading the browser to re-download the code with every hit. Under the webroot directory, cake returns code 304 if the browser already has a copy cached.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@110 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-14 00:46:12 +00:00
abijah
3be775f9b2 Added query ability to the customer grid. There is a bug with the paging code, but it roughly works.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@109 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-13 21:20:11 +00:00
abijah
0278c77610 Things are finally working fairly well for the customers grid (although I've not yet taken any speed issues into account). I removed the index.ctp file, since it was largely useless and I figured out how to render directly to the element. I also moved most of the jqGrid XML code into the application controller, since it will be reused by most of our controllers.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@108 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-13 20:46:17 +00:00
abijah
508a8b08aa Moved the position of the Loading... message on jqGrid. It probably doesn't matter, as we customize the grid, we'll likely add an icon instead of text to indicate loading.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@107 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-13 20:44:36 +00:00