Last active
October 16, 2022 10:17
-
-
Save sfboss/82241b55f6057e036daaadd76814d261 to your computer and use it in GitHub Desktop.
PDFController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public without sharing class PDF_BidSubmissionLPController { | |
| public Map<Integer, List<Bid__c>> bidsMap { get; set; } | |
| public Bid__c thebid { get; set; } // used by the page to avoid a repeat when we know that we will only have 1 bid | |
| public Housing__c housing { get; set; } // individual Stay data for the bid in question (child of bid will be RoomTypes and the Stay will be parent of the Bid and be just a one to many. | |
| public Revenue__c therevenue { get; set; } // used to show commission data | |
| public PDF_BidSubmissionLPController() { | |
| List<Revenue__c> searchRevenue = [ | |
| SELECT | |
| Id, | |
| Commission_Type__c, | |
| Commission__c, | |
| Commission_Percent__c, | |
| Commission_Due__c, | |
| Notes__c, | |
| Do_you_need_invoice_sent__c, | |
| Is_this_a_monthly_Pick_Up__c, | |
| Does_this_match_amount_on_pick_up_report__c, | |
| Indicate_Dates__c, | |
| CurrencyIsoCode, | |
| Rate_Currency__c, | |
| Tax__c, | |
| Surcharge__c, | |
| Tax_Included__c, | |
| Surcharge_Included__c, | |
| Commission_Agreed__c, | |
| Sign_name__c | |
| FROM Revenue__c | |
| WHERE | |
| RecordType.DeveloperName IN ('Housing_Rate_Commission_RRE', 'Housing_Rate_Commission_RRU') | |
| AND Bid__c IN (SELECT Id FROM Bid__c WHERE UUID_for_landing_page__c = :thebid.UUID_for_Landing_Page__c) | |
| AND Room_Type__c = null | |
| LIMIT 1 | |
| ]; | |
| theRevenues = searchRevenue; | |
| if (theRevenues.size() > 0) { | |
| therevenue = theRevenues[0]; | |
| } | |
| system.debug ('::::: ' + therevenue); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment