CMC header changes. Show bank details based on currency

This commit is contained in:
Karl Cordes 2021-03-19 21:19:04 +11:00
parent cb59d790b1
commit 2331775547
7 changed files with 84 additions and 19 deletions

View file

@ -41,7 +41,7 @@ error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/
Configure::write('debug', 0);
Configure::write('debug', 1);
Configure::write('version', '1.0.1');

View file

@ -11,7 +11,7 @@ class DATABASE_CONFIG {
'persistent' => false,
'host' => '172.17.0.1',
'login' => 'cmc',
'password' => 'xVRQI&cA?7AU=hqJ!%au',
'password' => 'cmc',
'database' => 'cmc',
'prefix' => '',
);

View file

@ -17,7 +17,7 @@ class PDFDOC extends FPDI {
$this->SetTextColor(0);
$this->SetFontSize(11); //Changed from 12
$this->SetFont('times', '');
$this->SetFont('helvetica', '');
$this->writeHTML($content, true, false, false, false, '');
}
@ -32,9 +32,9 @@ class PDFDOC extends FPDI {
// $this->Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden)
$this->Image(K_PATH_IMAGES.'cmclogosmall.jpg', 10, 10, 30, 0, null, 'http://www.cmctechnologies.com.au', null, false, null, 'L');
$this->Image(K_PATH_IMAGES.'2020cmclogosmall.jpg', 10, 10, 0, 28, null, 'http://www.cmctechnologies.com.au', null, false, null, 'L');
$this->Cell(30);
$this->SetFont('times', 'B');
$this->SetFont('helvetica', 'B');
$this->SetFontSize(30);
$this->Cell(0,0, $this->xheadertext, 0,1,'C', 1);
$this->SetFontSize(10);
@ -43,20 +43,20 @@ class PDFDOC extends FPDI {
$this->Cell(0,0, "PTY LIMITED ACN: 085 991 224 ABN: 47 085 991 224", 0, 1, 'C', 1);
//$this->Rect($x, $y, $w, $h, $style, $border_style);
$this->Rect($this->GetX()+33, $this->GetY()+2, 157, 1, 'DF', array('width'=>0), array(0, 0, 0));
$this->Rect($this->GetX()+33, $this->GetY()+2, 157, 0.2, 'DF', array('width'=>0), array(0, 0, 0));
/* Start the contact details */
$this->SetTextColor(0); //Set the Text Color to Black
$this->MultiCell(18, 0, "Phone:\nFax:\nEmail:\nWeb Site:\n", 0, 'L', 0, 0, 45, 32);
$this->MultiCell(30, 0, "Phone:\nFax:\nEmail:\nWeb Site:\n", 0, 'L', 0, 0, 45, 32);
$this->SetFont('helvetica', '');
$this->MultiCell(55, 0, "+61 2 9669 4000<br>+61 2 9669 4111<br><a href=\"mailto:sales@cmctechnologies.com.au\">sales@cmctechnologies.com.au</a>
<br><a href=\"http://www.cmctechnologies.net.au\">www.cmctechnologies.net.au</a><br>", 0, 'L', 0, 0, 65, null, true, 0, true);
$this->MultiCell(50, 0, "+61 2 9669 4000<br>+61 2 9669 4111<br><a href=\"mailto:sales@cmctechnologies.com.au\">sales@cmctechnologies.com.au</a>
<br><a href=\"http://www.cmctechnologies.com.au\">www.cmctechnologies.com.au</a><br>", 0, 'L', 0, 0, 65, null, true, 0, true);
$this->MultiCell(50, 0, "Unit 19, 77 Bourke Rd\nAlexandria\nNSW 2015\nAUSTRALIA\n", 0, 'L', 0, 0, 150, null);
$this->MultiCell(52, 0, "Unit 19, 77 Bourke Rd\nAlexandria NSW 2015\nAUSTRALIA\n", 0, 'L', 0, 0, 150, null);
$this->SetTextColor(0 , 0, 152); //Set the Text Color to Blue
$this->SetFont('times', 'B');
$this->SetFont('helvetica', 'B');
$this->MultiCell(30, 20, "Engineering &\nIndustrial\nInstrumentation", 0, 'L', 0, 1, 10,37);
}
@ -73,7 +73,7 @@ class PDFDOC extends FPDI {
$html = <<<ENDHTML
<span style="font-size:9pt">CMC TECHNOLOGIES Provides Solutions in the Following Fields<span><br>
<table cellspacing="2"><tr><td><span style="color: #99000a; font-weight: bold">EXPLOSION PREVENTION AND PROTECTION</span>&mdash;<span style="color: #ff0019; font-weight: bold">PRESSURE RELIEF</span>&mdash;<span style="color: #00801e; font-weight: bold">VISION IN THE PROCESS</span></td></tr>
<table cellspacing="2"><tr><td><span style="color: #99000a; font-weight: bold">EXPLOSION PREVENTION AND PROTECTION</span>&mdash;<span style="color: #ff9900; font-weight: bold">FIRE PROTECTION</span>&mdash;<span style="color: #ff0019; font-weight: bold">PRESSURE RELIEF</span>&mdash;<span style="color: #00801e; font-weight: bold">VISION IN THE PROCESS</span></td></tr>
<tr><td><span style="color: #2f4be0;">FLOW MEASUREMENT</span>&mdash;<span style="color: #ab31f8;">PROCESS INSTRUMENTATION</span></td></tr>
</table>
ENDHTML;

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -16,14 +16,47 @@ $col3width = '30%';
<span style="text-decoration: none;">Estimated Despatch Date:</span> <span style="text-align: right;"><?=$estimated_delivery?></span><br>
<? endif; ?>
<?php //TODO put conditional logic here if currency is AUD or EUR ?>
<span style="text-decoration: none;">Page: <?=$pageNo?> of <?=$totalCount?></span><br><br>
<span style="text-decoration: underline;">MAKE PAYMENT TO:</span><br>
<?php if($currencyCode == "EUR") { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Account Number/IBAN: 06200015682004<br>
Branch code: 06200<br>
SWIFT Code/BIC: CTBAAU2S<br>
</span>
<?php } elseif($currencyCode == "GBP") { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Account Number/IBAN: 06200015642694<br>
Branch code: 06200<br>
SWIFT Code/BIC: CTBAAU2S<br>
</span>
<?php } elseif($currencyCode == "USD") { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Account Number/IBAN: 06200015681984<br>
Branch code: 06200<br>
SWIFT Code/BIC: CTBAAU2S<br>
</span>
<?php } elseif($currencyCode == "AUD") { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Bank Number BSB#: 062-458<br>
Account Number: 10067982<br>
SWIFT Code: CTBAAU2S
SWIFT Code: CTBAAU2S<br>
IBAN: 06245810067982<br>
</span>
<?php } else { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Bank Number BSB#: 062-458<br>
Account Number: 10067982<br>
SWIFT Code: CTBAAU2S<br>
IBAN: 06245810067982<br>
</span>
<?php } ?>
</td>
</tr>
<tr>

View file

@ -17,11 +17,43 @@ $col3width = '30%';
<? endif; ?>
<span style="text-decoration: none;">Page: <?=$pageNo?> of <?=$totalCount?></span><br><br>
<span style="text-decoration: underline;">MAKE PAYMENT TO:</span><br>
<?php if($currencyCode == "EUR") { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Account Number/IBAN: 06200015682004<br>
Branch code: 06200<br>
SWIFT Code/BIC: CTBAAU2S<br>
</span>
<?php } elseif($currencyCode == "GBP") { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Account Number/IBAN: 06200015642694<br>
Branch code: 06200<br>
SWIFT Code/BIC: CTBAAU2S<br>
</span>
<?php } elseif($currencyCode == "USD") { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Account Number/IBAN: 06200015681984<br>
Branch code: 06200<br>
SWIFT Code/BIC: CTBAAU2S<br>
</span>
<?php } elseif($currencyCode == "AUD") { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Bank Number BSB#: 062-458<br>
Account Number: 10067982<br>
SWIFT Code: CTBAAU2S
SWIFT Code: CTBAAU2S<br>
IBAN: 06245810067982<br>
</span>
<?php } else { ?>
<span style="text-decoration: none;">Account Name: CMC Technologies Pty Ltd<br>
Bank Number BSB#: 062-458<br>
Account Number: 10067982<br>
SWIFT Code: CTBAAU2S<br>
IBAN: 06245810067982<br>
</span>
<?php } ?>
</td>
</tr>
<tr>

View file

@ -485,7 +485,7 @@ $(function() {
$("#saveOAButton").click(function() {
saveDocument('Order Acknowledgement');
//if the job has changed, the create invoice button wont work properly.
window.location.reload(true);
//window.location.reload(true);
$('.job-title').html($("#OrderAcknowledgementJobId :selected").text());
});
@ -500,7 +500,7 @@ $(function() {
$("#savePackingListButton").click(function() {
saveDocument('Packing List');
//if the job has changed, the create invoice button wont work properly.
window.location.reload(true);
//window.location.reload(true);
$('.job-title').html($("#PackingListJobId :selected").text());
});