Lien sur avoirs mis aussi sur onglet compta
This commit is contained in:
parent
fc1b5c5634
commit
98134851d0
@ -261,28 +261,28 @@ if ($_socid > 0)
|
||||
|
||||
print '<tr><td>'.$langs->transcountry('ProfId3',$objsoc->pays_code).'</td><td>'.$objsoc->ape.'</td><td colspan="2"> </td></tr>';
|
||||
|
||||
// Statut juridique
|
||||
print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td colspan="3">'.$objsoc->forme_juridique.'</td></tr>';
|
||||
|
||||
// Type + Staff
|
||||
$arr = $objsoc->typent_array($objsoc->typent_id);
|
||||
$objsoc->typent= $arr[$objsoc->typent_id];
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$objsoc->typent.'</td><td>'.$langs->trans("Staff").'</td><td>'.$objsoc->effectif.'</td></tr>';
|
||||
|
||||
// Remise permanente
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
print $langs->trans("CustomerRelativeDiscount");
|
||||
print '<td><td align="right">';
|
||||
print '<a href="remise.php?id='.$objsoc->id.'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$objsoc->id.'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
print '</td></tr></table>';
|
||||
print '</td><td colspan="3">'.$objsoc->remise_client." %</td>";
|
||||
|
||||
print '<tr><td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
// Remise avoirs
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr><td nowrap>';
|
||||
print $langs->trans("CustomerAbsoluteDiscount");
|
||||
print '<td><td align="right">';
|
||||
print '<a href="remx.php?id='.$objsoc->id.'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$objsoc->id.'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
@ -300,6 +300,7 @@ if ($_socid > 0)
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print "</table>";
|
||||
|
||||
print "</td>\n";
|
||||
@ -385,7 +386,7 @@ if ($_socid > 0)
|
||||
if ($num >0 )
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="noborder"><tr><td>'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/liste.php?socidp='.$objsoc->id.'">'.$langs->trans("AllOrders").' ('.$num.')</td></tr></table></td>';
|
||||
print '<td colspan="4"><table width="100%" class="noborder"><tr><td>'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/liste.php?socidp='.$objsoc->id.'">'.$langs->trans("AllOrders").' ('.$num.')</a></td></tr></table></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$i = 0;
|
||||
@ -751,7 +752,7 @@ if ($_socid > 0)
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
print '<td><a href="../user/fiche.php?id='.$obj->fk_user_author.'">'.$obj->code.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.$obj->code.'</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -161,15 +161,15 @@ if ($_socid > 0)
|
||||
if ($obj->fk_user == $user->id) $remise_user+=$obj->amount_ht;
|
||||
}
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
|
||||
print '<tr><td width="33%">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
|
||||
print '<td>'.$remise_all.' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
|
||||
print '<tr><td width="33%">'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
|
||||
print '<td>'.$remise_user.' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("NewValue").'</td>';
|
||||
print '<td><input type="text" size="5" name="remise" value="'.$remise_user.'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
|
||||
print '<tr><td align="center" colspan="2"> <input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
print '<tr><td align="center" colspan="2"> <input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
|
||||
print "</table></form>";
|
||||
|
||||
@ -181,7 +181,7 @@ if ($_socid > 0)
|
||||
/*
|
||||
* Liste
|
||||
*/
|
||||
$sql = "SELECT rc.amount_ht,".$db->pdate("rc.datec")." as dc, u.code";
|
||||
$sql = "SELECT rc.amount_ht,".$db->pdate("rc.datec")." as dc, u.code, u.rowid as user_id";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
@ -194,7 +194,7 @@ if ($_socid > 0)
|
||||
print_titre($langs->trans("Ristournes restant dues"));
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre"><td width="80">'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("AmountHT").'</td><td width="100">'.$langs->trans("Accordée par").'</td></tr>';
|
||||
print '<td width="120" align="right">'.$langs->trans("AmountTTC").'</td><td> </td><td width="100">'.$langs->trans("Accordée par").'</td></tr>';
|
||||
|
||||
$var = true;
|
||||
$i = 0 ;
|
||||
@ -205,8 +205,9 @@ if ($_socid > 0)
|
||||
$var = !$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>'.dolibarr_print_date($obj->dc).'</td>';
|
||||
print '<td>'.price($obj->amount_ht).'</td>';
|
||||
print '<td>'.$obj->code.'</td></tr>';
|
||||
print '<td align="right">'.price($obj->amount_ht).'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</td></tr>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
@ -221,16 +222,17 @@ if ($_socid > 0)
|
||||
print '<br />';
|
||||
|
||||
/*
|
||||
* Liste Archives
|
||||
* Liste ristournes appliquées
|
||||
*/
|
||||
$sql = "SELECT rc.amount_ht,".$db->pdate("rc.datec")." as dc, u.code, rc.fk_facture, f.facnumber";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql .= " AND fk_facture = f.rowid";
|
||||
$sql .= " AND u.rowid = rc.fk_user AND fk_facture IS NOT NULL";
|
||||
$sql .= " ORDER BY rc.datec DESC";
|
||||
$sql = "SELECT rc.amount_ht,".$db->pdate("rc.datec")." as dc, u.code, u.rowid as user_id,";
|
||||
$sql.= " rc.fk_facture, f.facnumber";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql.= " AND fk_facture = f.rowid";
|
||||
$sql.= " AND u.rowid = rc.fk_user AND fk_facture IS NOT NULL";
|
||||
$sql.= " ORDER BY rc.datec DESC";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
@ -238,7 +240,7 @@ if ($_socid > 0)
|
||||
print_titre($langs->trans("Ristournes appliquées"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="80">'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("AmountHT").'</td><td align="center">'.$langs->trans("Bill").'</td><td width="100">'.$langs->trans("Author").'</td></tr>';
|
||||
print '<td width="120" align="right">'.$langs->trans("AmountTTC").'</td><td align="center">'.$langs->trans("Bill").'</td><td width="100">'.$langs->trans("Author").'</td></tr>';
|
||||
|
||||
$var = true;
|
||||
$i = 0 ;
|
||||
@ -249,7 +251,7 @@ if ($_socid > 0)
|
||||
$var = !$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>'.dolibarr_print_date($obj->dc).'</td>';
|
||||
print '<td>'.price($obj->amount_ht).'</td>';
|
||||
print '<td align="right">'.price($obj->amount_ht).'</td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->fk_facture.'">'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.'</a></td>';
|
||||
print '<td>'.$obj->code.'</td></tr>';
|
||||
|
||||
|
||||
@ -235,20 +235,49 @@ if ($socid > 0)
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a> </td></tr>";
|
||||
|
||||
// TVA
|
||||
print '<tr><td nowrap>'.$langs->trans('VATIntraShort').'</td><td colspan="3">';
|
||||
print '<tr><td nowrap>'.$langs->trans('VATIntraVeryShort').'</td><td colspan="3">';
|
||||
print $societe->tva_intra;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Capital').'</td><td colspan="3">'.$societe->capital.' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
|
||||
// Statut juridique
|
||||
print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td colspan="3">'.$societe->forme_juridique.'</td></tr>';
|
||||
|
||||
// Type + Staff
|
||||
$arr = $societe->typent_array($societe->typent_id);
|
||||
$societe->typent= $arr[$societe->typent_id];
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$societe->typent.'</td><td>'.$langs->trans("Staff").'</td><td>'.$societe->effectif.'</td></tr>';
|
||||
|
||||
// Remise permanente
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
print $langs->trans("CustomerRelativeDiscount");
|
||||
print '<td><td align="right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$societe->id.'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
print '</td></tr></table>';
|
||||
print '</td><td colspan="3">'.$societe->remise_client." %</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Remise avoirs
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr><td nowrap>';
|
||||
print $langs->trans("CustomerAbsoluteDiscount");
|
||||
print '<td><td align="right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$societe->id.'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
$sql = "SELECT rc.amount_ht,".$db->pdate("rc.datec")." as dc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql .= " WHERE rc.fk_soc =". $societe->id;
|
||||
$sql .= " AND rc.fk_user = ".$user->id." AND fk_facture IS NULL";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj->amount_ht) print $obj->amount_ht.' '.$langs->trans("Currency".$conf->monnaie);
|
||||
else print $langs->trans("None");
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -51,6 +51,7 @@ ProfId3PT=Commercial Record number
|
||||
ProfId4PT=Conservatory
|
||||
TVAIntra=Intracommunautary VAT
|
||||
VATIntraShort=Intra-communautary VAT code
|
||||
VATIntraVeryShort=VAT Intra-comm.
|
||||
ProspectCustomer=Prospect / Customer
|
||||
Prospect=Prospect
|
||||
CustomerCard=Customer Card
|
||||
|
||||
@ -51,15 +51,16 @@ ProfId3PT=Num
|
||||
ProfId4PT=Conservatory
|
||||
TVAIntra=Numéro de TVA Intracommunautaire
|
||||
VATIntraShort=N° TVA Intra-communautaire
|
||||
VATIntraVeryShort=TVA Intra-comm.
|
||||
ProspectCustomer=Prospect / Client
|
||||
Prospect=Prospect
|
||||
CustomerCard=Fiche Client
|
||||
Customer=Client
|
||||
CustomerDiscount=Remise client
|
||||
CustomerRelativeDiscount=Remise relative
|
||||
CustomerAbsoluteDiscount=Remise absolue
|
||||
CustomerAbsoluteDiscountAllUsers=Remise absolue (tout utilisateur)
|
||||
CustomerAbsoluteDiscountMy=Remise absolue (personnel)
|
||||
CustomerAbsoluteDiscount=Remise avoirs
|
||||
CustomerAbsoluteDiscountAllUsers=Remise avoirs (accordée par tout utilisateur)
|
||||
CustomerAbsoluteDiscountMy=Remise avoirs (accordé personnellement)
|
||||
Supplier=Fournisseur
|
||||
CompanyList=Liste des sociétés
|
||||
AddContact=Ajouter contact
|
||||
|
||||
Loading…
Reference in New Issue
Block a user