Northteq / Creekridge_Portal

Contains the code for the Creekridge Capital portal.
0 stars 1 forks source link

Proposal Template #183

Closed Creekridge closed 9 years ago

Creekridge commented 9 years ago

@tbstevens - Couple of issues with the Proposal Template. 1 - In looking at the ProposalLetterTemplate.html stored in the C:\portal\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\CreekRidgeCapital-portlet\html\manageDocument location, there is coding included that is NOT showing up on the generated document. When I changed it and regenerated, the changes didn't show up on the new document. Is this where I'm supposed to be making changes or are the templates stored elsewhere? 2 - Loop through the ProposalLetterTemplate_ProposalOptions.html is not working correctly. The "Term" is showing up as the same value even though I selected 6 different values in the Application. 3 - Generated document is seeing Tags [eCreekRidge_CreditApp.CustomerAddress1] and [eCreekRidge_CreditApp.CustomerAddress2] as the same field and [eCreekRidge_CreditApp.equipmentDesc] and [eCreekRidge_CreditApp.EquipmentPrice] aren't loading at all - please confirm ALL database fields are mapped for use.

You can look at the document(s) I generated under Homecare Homebase.

Re-testing issue update:

  1. It looks like the process is taking the html template from the portal/templates folder and generating the document correctly. However, it is also generating another document under the title created in the Vendor Template Title custom field. Is this necessary or just a bug? It seems redundant and unnecessary. The Vendor Template name in the custom field is only for display purposes to the users.
  2. [Vendor Address] and [Vendor Zip] are not pulling the address in correctly.
tbstevens commented 9 years ago

@divinami - regarding the address1 and address2 in the 3rd item above, you can ignore that one Mike. There's a separate bug that will be assigned to Oleg to fix that from the front end.

mdivina commented 9 years ago

1 - Please modify the files in liferay-portal-6.2-ce-ga2\liferay-plugins-sdk-6.2\portlets\Creekridge-portlet\docroot\html\manageDocument (i.e. not tomcat-7.0.42\webapps\CreekRidgeCapital-portlet\html\manageDocument). Then do a build/deploy. 2 - Fixed. 3 - [eCreekRidge_CreditApp.equipmentDesc] and [eCreekRidge_CreditApp.equipmentPrice] were available. But there were the following issues in ProposalLetterTemplate.html: a. Misplaced/missing doubles quotes between lines 38 to 48. b. Tag [eCreekRidge_CreditApp.equipmentPrice] needs to have lower case "e". These have been been fixed in ProposalLetterTemplate.html.

Creekridge commented 9 years ago

@divinami - please document the "Build/deploy" process. I'll need to add/make changes to existing documents quickly.

mdivina commented 9 years ago

@tbstevens I just run the liferay-portal-6.2-ce-ga2\liferay-plugins-sdk-6.2\portlets\Creekridge-portlet\build.xml > deploy target. I'm not sure how to duplicate that on their server. I'm assuming there's already some process to deploy when we give them new code.

tbstevens commented 9 years ago

@Creekridge - We'll have a discussion on this first item and get back to you.

tbstevens commented 9 years ago

@Creekridge - We found a solution that would prevent you from having to do a build/deploy. The issue was related to the file location being part of the portlet and Tomcat's deployment of those folders is not always consistent. The fix was to create a consistent file location of c:\portal\templates. Once I deploy these changes to the prod server, I'll copy and paste all existing template files into this location. After being deployed, you can create edit or create new html files from that location without a deployment. I'll let you know once it is deployed (should be tonight or tomorrow morning).

tbstevens commented 9 years ago

Tested and working.

Creekridge commented 9 years ago

@tbstevens - I'm testing out some corrections to the proposal template. It looks like the "compile" is now happening the first time a document is generated and putting it in the portal\templates location as the name from the Vendor Template Titles custom field. Is this what you expected to happen?

Also, the pdf converter appears to be ignoring the "width" that I'm trying to set for the table cell properties. If you look at the Proposal - Sandy.html or the Proposal Letter Sandy.html in a browser, the widths are being rendering correctly, but if you look at the pdf in the site, all the columns are the width of the values in them.

Creekridge commented 9 years ago

@tbstevens - never mind the width item - I figured it out.

tbstevens commented 9 years ago

@Creekridge - Could you provide some more info regarding the first question? I'm not sure I understand what the issue or question is. The only files that would be in c:\portal\templates are the templates you are creating for doc generation. The Vendor Template Titles custom field is only there to provide a more customer-friendly name associated to the template available under that specific site. Are you seeing files being auto generated and landing in the c:\portal\templates folder?

Creekridge commented 9 years ago

@tbstevens - yes, I'm seeing files being auto-generated and lading in the C:\portals\templates folder. Example: my html template is called "Proposal Letter - Sandy.html" - this is the document that holds all the tags. I added it to the Homecare Homebase site with the Vendor Template Title of "Proposal Letter Sandy". After I generated the document to check the data and formatting, a file called "Proposal Letter Sandy.html" appeared in the folder and if I open it using IE, it shows me a generated document. I also loaded the same template to the Vendor1 site with the Title "Proposal - Sandy" and the file "Proposal - Sandy.html" is now in the templates folder. All I'm asking is if this is the expected behavior.

Creekridge commented 9 years ago

@tbstevens - another question re: table spacing. The template has the cellpadding, cellspacing, and border set to 0 on the tables, but the PDF generator appears to be adding a return or extra space in each row. If you look at the "Proposal Letter Sandy.html" in a browser window, you can see how I'm expecting the values to appear. Is there a setting in the pdf generator that can be changed?

Creekridge commented 9 years ago

@tbstevens - Custom field "Vendor Address" is not pulling into the generated document.

Creekridge commented 9 years ago

@tbstevens - Custom field "Vendor Zip" is also not pulling into the generated document.

tbstevens commented 9 years ago

@Creekridge - Thanks for explanation of what's occuring in the template folder. I was able to replicate it and it is not expected. I didn't notice it when testing. I'll have Mike revisit it. I'll also log the last 2 items. Regarding formatting issues, it will require more digging. The conversion is using standard HTML to PDF conversion through OpenOffice (Apache OpenOffice.org) which is using JODConverter behind that technology to actually do the conversion (http://www.artofsolving.com/opensource/jodconverter)

tbstevens commented 9 years ago

@divinami - Hey Mike - There's a couple items to fix. It's listed in the restesting updates in the description above.

Creekridge commented 9 years ago

@tbstevens - Hold off on the digging - I just thought it might be something straightforward. We can live with it as is for now.

mdivina commented 9 years ago

Fix for retesting issues checked into Git.

tbstevens commented 9 years ago

@divinami - Thanks Mike.

tbstevens commented 9 years ago

@Creekridge - Sandy - the fix was deployed to production so you can test tomorrow morning if needed. Looks like there is no longer an extra file being generated in the templates folder and the vendor address and vendor zip are pulling into the template I generated. And I hadn't done any digging yet on the pdf formatting issue -- I was waiting for your feedback. I'll hold off. Thanks!

Creekridge commented 9 years ago

@tbstevens - Now Vendor Phone isn't pulling. Vendor Address and Zip are.

Creekridge commented 9 years ago

@tbstevens - oops the custom field is actually Rep Phone - However, it still doesn't work.

tbstevens commented 9 years ago

@divinami - Hey Mike, looks like the [Rep Phone] custom field is not available from the template. This is my fault for not communicating all of the various custom fields on the site level that should be made available for use in the templates. To make sure we don't have other issues with additional custom fields here, I'll send you the full list of custom fields to make sure are available in the template. I'll have them to you within an hour (need to jump on a call).

tbstevens commented 9 years ago

@divinami - Mike, here are the custom fields we need to make sure are available in the doc templates and pulling in the value according to the custom field key name (matches the names below).

Provider Name Rep Email Rep Name Rep Phone Vendor Address Vendor Address 2 Vendor City Vendor State Vendor Zip Code

mdivina commented 9 years ago

Added Rep Email, Rep Name and Rep Phone. Others existed.

tbstevens commented 9 years ago

@Creekridge - Ready in prod.

Creekridge commented 9 years ago

@tbstevens - Rep phone is now pulling, but [eCreekRidge_CreditApp.CustomerBusinessDesc] is not.

Creekridge commented 9 years ago

@tbstevens - weird - I just completely closed out and back in and now the [eCreekRidge_CreditApp.CustomerBusinessDesc] is working.