<#-- @ftlvariable name="data" type="com.dantek.dl.template.model.balancestatement.BalanceStatementTemplateDataModel" --> <#assign inEnglish = data.loaner?? && data.loaner.preferredLanguage?? && data.loaner.preferredLanguage == "en"> <#assign inSwedish = data.loaner?? && data.loaner.preferredLanguage?? && data.loaner.preferredLanguage == "sv"> <#if inEnglish> Statement <#elseif inSwedish> Saldouppgörelse <#else> Saldoopgørelse <#setting number_format=",##0.00"> <#setting locale="da_DK"> <#if inEnglish> <#elseif inSwedish> <#else>

<#if (data.loaner.coName?has_content)>${data.loaner.coName}

${data.agency.name}
${data.loaner.name} Balance statementMellanhavandeSaldoopgørelse
<#if (data.loaner.addressStreet?has_content)>${data.loaner.addressStreet}
<#if (data.loaner.zipCode?has_content||data.loaner.addressCity?has_content)>${(data.loaner.zipCode )!""} ${(data.loaner.addressCity)!""}
<#if inEnglish> Patron number: ${data.loaner.loanerNumber} <#elseif inSwedish> Låntagarnr: ${data.loaner.loanerNumber} <#else> Lånernr.: ${data.loaner.loanerNumber} <#if inEnglish> Print Date ${.now?string("dd/MM-yyyy")} <#elseif inSwedish> Utskrivet den ${.now?string("dd/MM-yyyy")} <#else> Udskrevet den ${.now?string("dd/MM-yyyy")}

    <#if inEnglish>

Dear ${data.loaner.name}

We can see that you have an outstanding balance with the library. Therefore, we have sent
you a balance statement. If materials are handed in in good condition, you only pay fees.
    <#elseif inSwedish>

Hej ${data.loaner.name}

Vi kan se att du har utestående i biblioteket. Därför har vi skickat ett saldouppgörelse.
Om material lämnas in i gott skick betalar du bara avgifter.
    <#else>

Kære ${data.loaner.name}

Vi kan se, at du har udestående med biblioteket. Vi har derfor sendt dig en saldoopgørelse.
Afleveres materialer i god stand, kan du nøjes med at betale gebyrer.
    
<#if (data.fees?has_content)>

<#if inEnglish> Fees <#elseif inSwedish> Avgifter <#else> Gebyrer

<#list data.fees as fee> <#if inEnglish> <#elseif inSwedish> <#else> <#if (fee.materialLoans?has_content)> <#list fee.materialLoans as materialLoan> <#if (fee_has_next)>
${fee.billNumber} <#if (fee.text?has_content)>${(fee.text)[0..*30]}<#if (fee.text?has_content && fee.loanDate?has_content)>, ${(fee.loanDate?string("dd/MM-yyyy"))!""} ${fee.amount} kr.${fee.amount} SEK.${fee.amount} kr.
${materialLoan.materialNumber!""}, <#if (materialLoan.author?has_content)>${(materialLoan.author)[0..*30]}, <#if (materialLoan.title?has_content)> <#if (materialLoan.author?has_content)> ${(materialLoan.title)[0..*30]} <#if (materialLoan.periodicalName)??>(${(materialLoan.periodicalName)}) <#if inEnglish>
<#if fee.returnDate?has_content>Hand-in deadline: ${fee.returnDate?string["dd/MM-yyyy"]}. Fee created: ${(fee.balanceDate?date?string["dd/MM-yyyy"])!""} <#elseif inSwedish>
<#if fee.returnDate?has_content>Afleveringsfrist: ${fee.returnDate?string["dd/MM-yyyy"]}. Gebyr oprettet: ${(fee.balanceDate?date?string["dd/MM-yyyy"])!""} <#else>
<#if fee.returnDate?has_content>Afleveringsfrist: ${fee.returnDate?string["dd/MM-yyyy"]}. Gebyr oprettet: ${(fee.balanceDate?date?string["dd/MM-yyyy"])!""}
<#if inEnglish> <#elseif inSwedish> <#else>

Sum   ${data.sumOfFees} kr.

Summa   ${data.sumOfFees} SEK.

Sum   ${data.sumOfFees} kr.

<#if (data.compensations?has_content)>

<#if inEnglish> Compensations <#elseif inSwedish> Ersättningar <#else> Erstatninger

<#list data.compensations as compensation> <#if inEnglish> <#elseif inSwedish> <#else> <#if (compensation.materialLoan?has_content)> <#if (compensation_has_next)>
${compensation.billNumber}<#if compensation.migratedBillNumber??> (${compensation.migratedBillNumber}) <#if (compensation.text?has_content)>${(compensation.text)[0..*30]}<#if (compensation.materialLoan?has_content && compensation.materialLoan.loanDate?has_content)><#if (compensation.text?has_content)>, ${(compensation.materialLoan.loanDate?string("dd/MM-yyyy"))} ${compensation.amount} kr.${compensation.amount} SEK.${compensation.amount} kr.
${compensation.materialLoan.materialNumber!""}, <#if (compensation.materialLoan.author?has_content)> ${(compensation.materialLoan.author)[0..*15]}, <#if (compensation.materialLoan.title?has_content)> <#if (compensation.materialLoan.author?has_content)> ${(compensation.materialLoan.title)[0..*30]} <#if (compensation.materialLoan.periodicalName)??>(${(compensation.materialLoan.periodicalName)})
<#if inEnglish> <#elseif inSwedish> <#else>

Sum   ${data.sumOfCompensations} kr.

Summa   ${data.sumOfCompensations} SEK.

Sum   ${data.sumOfCompensations} kr.

<#if inEnglish> <#elseif inSwedish> <#else>

Total outstandings Total   ${data.total} kr.
Totala utestående Totalt   ${data.total} SEK.
Samlet mellemværende I alt   ${data.total} kr.