Simple problem, causing big headache!

Hi everyone we use some php program that apparently is messy code

Anyway in one section of the admin panel/crm there is a commission section where we enter start and end dates.

We then click “process” buton and it will fetch a list of customer records and have a dollar amount of the commission for each customer. It looks like a bunch of pages one after the other where it automatically pops up with a “do you want to print” dialog box.

Anyway the problem is
when we fetch these commissions it also fetches comissions that have $0.00 commission figure. We then have to manually remove these all once printed, which is time consuming.

is there a way where it doesnt fetch the $0.00 figures and just fetches records that have a positive figure, and then we can print them like we do now.

Below is the code in the commission page if it helps:
Not sure if we change the code here, or in the print.php page?
[php]
if($_GET[‘view’]==‘history’){
$vm->comHist();
}elseif($_GET[‘print’]==‘0’){
$_SESSION[‘start’]=’’;
$_SESSION[‘end’]=’’;
$_SESSION[‘address’]=’’;
$_SESSION[‘attn’]=’’;
$_SESSION[‘total’]=’’;
echo ‘’;
}else{
$vm->commission();
}
$layout->foot();
?>[/php]

It’s hard to know without seeing the full code.

Show us the print.php source. It’s also helpful if you put it in a PHP block as it highlights the code. When typing your message, press the PHP button above where you type and put your code within the php tags.

You can add to your WHERE clause, removing the 0 dollar amounts. Hopefully, it is not storing the values as $0.00, but just 0?

[php]WHERE [column] > 0[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service