This file contains 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
/** DIN 5008 (Type A) with margins and paddings */ | |
@page { | |
size: A4 portrait; | |
margin: 27mm 0mm 32mm 0mm; /** These margins control size of header and footer */ | |
padding: 5mm 0mm; /** Paddings for content page area to header/footer */ | |
} |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> | |
[...] | |
<valueSet> | |
<restricted>true</restricted> | |
<valueSetDefinition> | |
<sorted>false</sorted> | |
<value> | |
<fullName>DIN_5008_Type_A</fullName> | |
<default>true</default> |
This file contains 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 static PdfTemplate__c Template { | |
public get { | |
if (Template == null && TemplateId != null) { | |
Template = [SELECT Id,AddressFormatting__c,DateFormatting__c,Description__c,IsActive__c,LetterFormat__c,TaxDisplayOptions__c FROM PdfTemplate__c WHERE Id = :TemplateId]; | |
} | |
return Template; | |
} | |
private set; | |
} |
This file contains 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
<apex:variable rendered="{! Template.LetterFormat__c != NULL }" var="LetterFormat" value="{! Template.LetterFormat__c }"> | |
<apex:stylesheet value="{! URLFOR($Resource[Template.LetterFormat__c]) }" /> | |
</apex:variable> |
This file contains 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 static String DateFormatting { | |
public get { | |
if (DateFormatting == null) { | |
if (String.isNotBlank(Template.DateFormatting__c)) { | |
DateFormatting = '{0, date, '+ Template.DateFormatting__c +'}'; | |
} else { | |
DateFormatting = '{0, date, dd.MM.yyyy}'; | |
} | |
} | |
return DateFormatting; |
This file contains 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
<apex:outputText value="{!DateFormatting}"> | |
<apex:param value="{! Record.Your_Date_Field__c }" /> | |
</apex:outputText> |
This file contains 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 static Component.Apex.PageBlock DynamicAddress { | |
public get { | |
if (DynamicAddress == null && Template != null && String.isNotBlank(Template.AddressFormatting__c)) { | |
DynamicAddress dynAddr = new DynamicAddress(Template.AddressFormatting__c); | |
dynAddr.RecordVariableName = 'QuoteRecord'; | |
DynamicAddress = dynAddr.getAddressAsPageBlock(); | |
} | |
return DynamicAddress; | |
} | |
private set; |
This file contains 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
jobs: | |
build_and_install_production: | |
executor: | |
name: sfdx-default | |
steps: | |
- checkout | |
- sfdx/install | |
- run: | |
name: Setup SFDX CLI | |
command: | |