<?php

require_once 'functions.php';
$a = 1;
$c = 'test';
sum();
changeA();
changeA();
var_dump($a);
$CustIDdoc = changeA($CustIDdoc);
$CustDetails = changeA($CustDetails);
$ADSLTel = changeA($ADSLTel);
$CustPW = changeA($CustPW);
$Important = changeA($Important);*/
$Abbr = changeA($Abbr);
$InvPdStatus = changeA($InvPdStatus);
$Summary = changeA($Summary);
$D1 = changeA($D1);
$D2 = changeA($D2);
$D3 = changeA($D3);
$D4 = changeA($D4);
$D5 = changeA($D5);
$D6 = changeA($D6);
$D7 = changeA($D7);
$D8 = changeA($D8);
$earlySDR = "_";
//$earlySDR = $Abbr.',acc'.$CustNo.',inv'.$InvNo.','.$Summary;
$earlySDR = $Abbr . ',inv' . $InvNo . ',' . $Summary;
include "monthtables.php";
//truncated error: http://stackoverflow.com/questions/1704304/what-is-this-error-database-query-failed-data-truncated-for-column-column-na
if ($Q2 == '') {
    $Q2 = 0;
}
if ($Q3 == '') {
    $Q3 = 0;
}
if ($Q4 == '') {
    $Q4 = 0;
}
if ($Q5 == '') {