Merge pull request #6691 from grandoc/testing

Update code using new css class
This commit is contained in:
Juanjo Menent 2017-04-19 16:08:44 +02:00 committed by GitHub
commit 2e4e3737e8
25 changed files with 47 additions and 107 deletions

View File

@ -369,8 +369,7 @@ if ($action == 'create') {
print "</tr>\n";
foreach ($book->linesmvt as $line) {
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
$total_debit += $line->debit;
$total_credit += $line->credit;
@ -420,8 +419,7 @@ if ($action == 'create') {
}
if ($action == "" || $action == 'add') {
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td>';
print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
print '</td>';

View File

@ -265,7 +265,6 @@ $sous_total_credit = 0;
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
foreach ( $object->lines as $line ) {
$var = ! $var;
$total_debit += $line->debit;
$total_credit += $line->credit;
@ -298,7 +297,7 @@ foreach ( $object->lines as $line ) {
$sous_total_credit = 0;
}
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>&nbsp;</td>';
print '<td align="right">'.$line->piece_num.'</td>';
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';

View File

@ -267,9 +267,8 @@ print "</tr>\n";
$var = True;
foreach ( $object->lines as $line ) {
$var = ! $var;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $line->piece_num . '</td>' . "\n";
print '<td>' . $line->doc_type . '</td>' . "\n";
print '<td align="center">' . dol_print_date($line->doc_date) . '</td>';

View File

@ -244,8 +244,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@ -301,8 +300,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';

View File

@ -313,7 +313,6 @@ if ($result) {
$var = true;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
$objp->code_sell_l = '';
$objp->code_sell_p = '';
@ -354,7 +353,7 @@ if ($result) {
// $objp->code_sell_p is now code of product/service
// $objp->code_sell_l is now default code of product/service
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
// Line id
print '<td>' . $objp->rowid . '</td>';

View File

@ -217,8 +217,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@ -271,8 +270,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';

View File

@ -268,13 +268,12 @@ if ($result) {
$var = True;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
$codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
$expensereport_static->ref = $objp->ref;
$expensereport_static->id = $objp->erid;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $objp->rowid . '</td>';

View File

@ -299,7 +299,6 @@ if ($result) {
$var = true;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
$objp->aarowid_suggest = '';
$objp->aarowid_suggest = $objp->aarowid;
@ -307,7 +306,7 @@ if ($result) {
$expensereport_static->ref = $objp->ref;
$expensereport_static->id = $objp->erid;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
// Line id
print '<td>' . $objp->rowid . '</td>';

View File

@ -749,7 +749,6 @@ if (empty($action) || $action == 'view') {
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
foreach ( $tabpay as $key => $val ) { // $key is rowid in llx_bank
@ -826,7 +825,7 @@ if (empty($action) || $action == 'view') {
// Bank
foreach ( $tabbq[$key] as $k => $mt )
{
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Bank bank.rowid=".$key."--></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
@ -853,7 +852,7 @@ if (empty($action) || $action == 'view') {
if (is_array($tabtp[$key])) {
foreach ( $tabtp[$key] as $k => $mt ) {
if ($k != 'type') {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Thirdparty bank.rowid=".$key." --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
@ -874,7 +873,7 @@ if (empty($action) || $action == 'view') {
}
} else {
foreach ( $tabbq[$key] as $k => $mt ) {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Wait bank.rowid=".$key." --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
@ -892,7 +891,6 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
$var = ! $var;
}
print "</table>";

View File

@ -449,7 +449,6 @@ if (empty($action) || $action == 'view') {
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$expensereportstatic = new ExpenseReport($db);
@ -468,7 +467,7 @@ if (empty($action) || $action == 'view') {
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print "<tr " . $bc[$var] . " >";
print '<tr class="oddeven">';
print "<td><!-- Fees --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
@ -494,7 +493,7 @@ if (empty($action) || $action == 'view') {
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print "<tr " . $bc[$var] . " >";
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
@ -512,7 +511,7 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
@ -534,8 +533,6 @@ if (empty($action) || $action == 'view') {
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
}
print "</tr>";
$var = ! $var;
}
print "</table>";

View File

@ -498,7 +498,6 @@ if (empty($action) || $action == 'view') {
print "<t><td>" . $langs->trans("Type") . "</td><td align='right'>" . $langs->trans("Debit") . "</td><td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$invoicestatic = new FactureFournisseur($db);
@ -521,7 +520,7 @@ if (empty($action) || $action == 'view') {
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print "<tr " . $bc[$var] . " >";
print '<tr class="oddeven">';
print "<td><!-- Product --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
@ -545,7 +544,7 @@ if (empty($action) || $action == 'view') {
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print "<tr " . $bc[$var] . " >";
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
@ -563,7 +562,7 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
@ -588,8 +587,6 @@ if (empty($action) || $action == 'view') {
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
}
print "</tr>";
$var = ! $var;
}
print "</table>";

View File

@ -517,7 +517,6 @@ if (empty($action) || $action == 'view') {
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$invoicestatic = new Facture($db);
@ -532,7 +531,7 @@ if (empty($action) || $action == 'view') {
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
@ -562,7 +561,7 @@ if (empty($action) || $action == 'view') {
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Product --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
@ -585,7 +584,7 @@ if (empty($action) || $action == 'view') {
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
@ -604,8 +603,6 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
$var = ! $var;
}
print "</table>";

View File

@ -127,7 +127,6 @@ if (!empty($cats))
$position = -1;
$code = -1;
foreach($cpts as $i => $cpt){
$var = ! $var;
$position = $cpt['position'];
$code = $cpt['code'];
@ -149,7 +148,7 @@ if (!empty($cats))
}
$sommes[$code]['NP'] += $resultNP;
$sommes[$code]['N'] += $resultN;
print '<tr'. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $cpt['account_number'] . '</td>';
print '<td>' . $cpt['name_cpt'] . '</td>';
print '<td>' . price($resultNP) . '</td>';

View File

@ -215,8 +215,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@ -270,8 +269,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';

View File

@ -313,7 +313,6 @@ if ($result) {
$var = true;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
// product_type: 0 = service ? 1 = product
// if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service
@ -355,7 +354,7 @@ if ($result) {
// $objp->code_buy_p is now code of product/service
// $objp->code_buy_l is now default code of product/service
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
// Line id
print '<td>' . $objp->rowid . '</td>';

View File

@ -125,10 +125,8 @@ print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>';
print "</tr>\n";
$var=true;
// Login/Pass required for members
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
@ -141,7 +139,6 @@ print "</td></tr>\n";
print '</form>';
// Mail required for members
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
@ -154,7 +151,6 @@ print "</td></tr>\n";
print '</form>';
// Send mail information is on by default
print '<form action="adherent.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
@ -167,7 +163,6 @@ print "</td></tr>\n";
print '</form>';
// Insert subscription into bank account
print '<form action="adherent.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
@ -188,7 +183,6 @@ print '</form>';
// Use vat for invoice creation
if ($conf->facture->enabled)
{
print '<form action="adherent.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
@ -213,7 +207,6 @@ if ($conf->facture->enabled)
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
{
print '<form action="adherent.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';

View File

@ -145,10 +145,8 @@ print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td align="right">'.$langs->trans("Value").'</td>';
print "</tr>\n";
$var=true;
// Allow public form
$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr class="oddeven"><td>';
print $langs->trans("EnablePublicSubscriptionForm");
@ -157,10 +155,9 @@ print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_E
print "</td></tr>\n";
// Force Type
$var=! $var;
$adht = new AdherentType($db);
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].' class="drag"><td>';
print '<tr class="oddeven drag"><td>';
print $langs->trans("ForceMemberType");
print '</td><td width="60" align="center">';
$listofval = array(-1 => $langs->trans("Undefined"));
@ -170,18 +167,16 @@ print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, cou
print "</td></tr>\n";
// Amount
$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].' id="tramount"><td>';
print '<tr class="oddeven" id="tramount"><td>';
print $langs->trans("DefaultAmount");
print '</td><td align="right">';
print '<input type="text" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" size="5" value="'.(! empty($conf->global->MEMBER_NEWFORM_AMOUNT)?$conf->global->MEMBER_NEWFORM_AMOUNT:'').'">';
print "</td></tr>\n";
// Can edit
$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].' id="tredit"><td>';
print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("CanEditAmount");
print '</td><td align="right">';
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1);
@ -190,8 +185,7 @@ print "</td></tr>\n";
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
{
// Jump to an online payment page
$var=! $var;
print '<tr '.$bc[$var].' id="trpayment"><td>';
print '<tr class="oddeven" id="trpayment"><td>';
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
print '</td><td align="right">';
$listofval=array();
@ -204,8 +198,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
{
// Jump to an online payment page
$var=! $var;
print '<tr '.$bc[$var].' id="tremail"><td>';
print '<tr class="oddeven" id="tremail"><td>';
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
print '</td><td align="right">';
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';

View File

@ -246,7 +246,6 @@ $var=true;
krsort($Total);
foreach ($Total as $key=>$value)
{
print '<tr class="oddeven">';
print "<td><a href=\"./subscription/list.php?date_select=$key\">$key</a></td>";
print "<td align=\"right\">".$Number[$key]."</td>";
@ -267,9 +266,6 @@ print "</table><br>\n";
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
$var=true;
/*
* Last modified members
*/
@ -295,10 +291,8 @@ if ($resql)
if ($num)
{
$i = 0;
$var = True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
$staticmember->id=$obj->rowid;
@ -358,10 +352,8 @@ if ($resql)
if ($num)
{
$i = 0;
$var = True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
$subscriptionstatic->id=$obj->cid;
@ -407,7 +399,6 @@ print "</tr>\n";
foreach ($AdherentType as $key => $adhtype)
{
print '<tr class="oddeven">';
print '<td>'.$adhtype->getNomUrl(1, dol_size(32)).'</td>';
print '<td align="right">'.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->subscription,0,3).'</td>';

View File

@ -127,11 +127,9 @@ if (! $foundphy) $data[]=array('label'=>'phy','nb'=>'0','lastdate'=>'');
if (! $foundmor) $data[]=array('label'=>'mor','nb'=>'0','lastdate'=>'');
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
print '<tr class="oddeven">';
print '<td>'.$memberstatic->getmorphylib($val['label']).'</td>';
print '<td align="right">'.$val['nb'].'</td>';

View File

@ -291,11 +291,9 @@ if ($mode)
print '</tr>';
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
print '<tr class="oddeven">';
print '<td>'.$val['label'].'</td>';
if ($label2) print '<td align="center">'.$val['label2'].'</td>';

View File

@ -176,15 +176,13 @@ print '<td align="right">'.$langs->trans("AmountAverage").'</td>';
print '</tr>';
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
while ($oldyear > $year+1)
{ // If we have empty year
$oldyear--;
print '<tr '.$bc[$var].' height="24">';
print '<tr class="oddeven" height="24">';
print '<td align="center">';
print '<a href="month.php?year='.$oldyear.'&amp;mode='.$mode.'">';
print $oldyear;
@ -195,8 +193,7 @@ foreach ($data as $val)
print '<td align="right">0</td>';
print '</tr>';
}
print '<tr '.$bc[$var].' height="24">';
print '<tr class="oddeven" height="24">';
print '<td align="center">';
//print '<a href="month.php?year='.$year.'">';
print $year;

View File

@ -821,11 +821,9 @@ if ($rowid > 0)
}
print "</tr>\n";
$var=True;
while ($i < $num)
{
$objp = $db->fetch_object($result);
print '<tr class="oddeven">';
$subscriptionstatic->ref=$objp->crowid;
$subscriptionstatic->id=$objp->crowid;

View File

@ -206,11 +206,9 @@ if (! $rowid && $action != 'create' && $action != 'edit')
print '<th>&nbsp;</th>';
print "</tr>\n";
$var=True;
while ($i < $num)
{
$objp = $db->fetch_object($result);
print '<tr class="oddeven">';
print '<td><a href="'.$_SERVER["PHP_SELF"].'?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowType"),'group').' '.$objp->rowid.'</a></td>';
print '<td>'.dol_escape_htmltag($objp->libelle).'</td>';
@ -518,7 +516,6 @@ if ($rowid > 0)
print "</tr>\n";
$var=True;
while ($i < $num && $i < $conf->liste_limit)
{
$objp = $db->fetch_object($resql);
@ -530,7 +527,6 @@ if ($rowid > 0)
$adh->firstname=$objp->firstname;
// Lastname
print '<tr class="oddeven">';
if ($objp->societe != '')
{

View File

@ -7,7 +7,7 @@
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2016 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2010-2017 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
@ -3113,21 +3113,21 @@ class Propal extends CommonObject
$line->qty=1;
$line->subprice=100;
$line->price=100;
$line->tva_tx=19.6;
$line->tva_tx=20;
$line->localtax1_tx=0;
$line->localtax2_tx=0;
if ($xnbp == 2)
{
$line->total_ht=50;
$line->total_ttc=59.8;
$line->total_tva=9.8;
$line->total_ttc=60;
$line->total_tva=10;
$line->remise_percent=50;
}
else
{
$line->total_ht=100;
$line->total_ttc=119.6;
$line->total_tva=19.6;
$line->total_ttc=120;
$line->total_tva=20;
$line->remise_percent=00;
}
@ -3135,6 +3135,7 @@ class Propal extends CommonObject
{
$prodid = mt_rand(1, $num_prods);
$line->fk_product=$prodids[$prodid];
$line->product_ref='SPECIMEN';
}
$this->lines[$xnbp]=$line;

View File

@ -3541,25 +3541,26 @@ class Commande extends CommonOrder
$line->qty=1;
$line->subprice=100;
$line->price=100;
$line->tva_tx=19.6;
$line->tva_tx=20;
if ($xnbp == 2)
{
$line->total_ht=50;
$line->total_ttc=59.8;
$line->total_tva=9.8;
$line->total_ttc=60;
$line->total_tva=10;
$line->remise_percent=50;
}
else
{
$line->total_ht=100;
$line->total_ttc=119.6;
$line->total_tva=19.6;
$line->total_ttc=120;
$line->total_tva=20;
$line->remise_percent=0;
}
if ($num_prods > 0)
{
$prodid = mt_rand(1, $num_prods);
$line->fk_product=$prodids[$prodid];
$line->product_ref='SPECIMEN';
}
$this->lines[$xnbp]=$line;