|
retrieveCommission($comID);
$commissions->findCommissionAmount($commission['orders_id'], $commission_rule_description, $commission['commercials_id']);
}
else
{
$orders_id = (isset($HTTP_GET_VARS['orders_id']) ? tep_db_prepare_input($HTTP_GET_VARS['orders_id']) : '');
$customers_id = (isset($HTTP_GET_VARS['customers_id']) ? tep_db_prepare_input($HTTP_GET_VARS['customers_id']) : '');
$commercials_id = (isset($HTTP_GET_VARS['cID']) ? tep_db_prepare_input($HTTP_GET_VARS['cID']) : '');
if ( $orders_id != '' )
{
if ( $customers_id == "" ) $customers_id = $commissions->findCustomerId($orders_id);
if ( $commercials_id == "" ) $commercials_id = $commissions->findCommercialId($orders_id);
}
if ( $orders_id != '' and $commercials_id != '' )
{
$amount = $commissions->findCommissionAmount($orders_id, $commission_rule_description, $commercials_id);
}
$commission = array(
'orders_id' => $orders_id,
'commercials_id' => $commercials_id,
'customers_id' => $customers_id,
'amount' => $amount
);
}
?>
|
|
|
|
|
|
|
| '', 'text' => TEXT_ALL_COMMISSIONS)), $commissions_statuses), '', 'id="statusesList" onChange="this.form.submit();"'); ?> |
|
|
|
|
|
|
|
|
|
|
|
id)) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
?>
| ' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . ' ' . $commission['id']; ?> |
|
|
|
|
|
|
getCommissionStatusDescription($commission['status']); ?> |
id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> |
| display_count($commissions_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?> |
display_links($commissions_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'oID', 'action'))); ?> |
|
|
|
'' . TEXT_INFO_HEADING_DELETE_COMMISSION . '');
$contents = array('form' => tep_draw_form('commissions', FILENAME_COMMISSIONS, tep_get_all_get_params(array('comID', 'action')) . 'comID=' . $cInfo->id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '
' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '');
$contents[] = array('align' => 'center', 'text' => ' ' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (isset($cInfo) && is_object($cInfo)) {
$heading[] = array('text' => '[' . $oInfo->orders_id . '] ' . tep_datetime_short($oInfo->date_purchased) . '');
// -> ORED5066+MANORM155
// vd, 12/9/2013 : demande du client : suppression du bouton effacer
/*
$contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_details.gif', IMAGE_DETAILS) . ' ' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '');
*/
$contents[] = array('align' => 'center', 'text' => tep_button(TEXT_BUTTON_EDIT, tep_href_link(FILENAME_COMMISSIONS, tep_get_all_get_params(array('comID', 'action')) . 'comID=' . $cInfo->id . '&action=edit'), '" TARGET="_blank"'). " " .
tep_button(TEXT_BUTTON_CREATE_COMMISSION, tep_href_link(FILENAME_COMMISSIONS, 'action=create&cID=' . $cID), '" TARGET="_blank"'). " ");
$contents[] = array('align' => 'center', 'text' => tep_button(TEXT_BUTTON_PAID, tep_href_link(FILENAME_COMMISSIONS, tep_get_all_get_params(array('comID', 'action')) . 'comID=' . $cInfo->id . '&action=changestatus&newstatus=R'), '" TARGET="_blank"'). " " .
tep_button(TEXT_BUTTON_DELETE, tep_href_link(FILENAME_COMMISSIONS, tep_get_all_get_params(array('comID', 'action')) . 'comID=' . $cInfo->id . '&action=delete'), '" TARGET="_blank"'). " ");
$contents[] = array('align' => 'center', 'text' => tep_button_new_window(TEXT_BUTTON_ORDER, tep_href_link(FILENAME_ORDERS, 'oID=' . $cInfo->orders_id . '&action=edit')). " ");
$contents[] = array('text' => ' ' . TEXT_DATE_CREATED . ' ' . tep_date_short($cInfo->date_created));
$contents[] = array('text' => ' ' . TEXT_COMMENT . ' ' . $cInfo->comments);
}
break;
}
echo '
' . "\n";
if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo '
| ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
'' . TEXT_INFO_HEADING_DELETE_ORDER . '');
$contents = array('form' => tep_draw_form('orders', FILENAME_COMMISSIONS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '
' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '');
$contents[] = array('align' => 'center', 'text' => ' ' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
}
break;
default:
if (isset($oInfo) && is_object($oInfo)) {
$heading[] = array('text' => '' . TEXT_INFO_HEADING_CREDIT_NOTE . '[' . $orders_avoir_id['orders_avoir_id'] . '] ');
if ($orders_avoir_id['orders_avoir_id'] == '') {
$contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_insert.gif', IMAGE_INSERT) . '');
}
if ($orders_avoir_id['orders_avoir_id'] != '') {
$contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '');
//$contents[] = array( 'align' => 'center', 'text' => ' ' . tep_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . tep_image_button('button_invoice_avoir.gif', IMAGE_ORDERS_INVOICE_AVOIR));
$contents[] = array( 'align' => 'center', 'text' => ' ' . tep_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . tep_image_button('button_invoice_avoir.gif', IMAGE_ORDERS_INVOICE_AVOIR));
}
$contents[] = array('text' => ' ' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased));
if (tep_not_null($oInfo->last_modified)) $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . tep_date_short($oInfo->last_modified));
$contents[] = array('text' => ' ' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method);
$contents[] = array('text' => ' ' . TEXT_CUSTOMERS_ID . ' ' . $oInfo->customers_id);
}
break;
}
if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo '
| ' . "\n";
echo ' | ' . "\n";
}
echo ' | ' . "\n";
//################### FIN FACTURE D'AVOIR ##############################
?>
|
|