';
- // Ref
- print '| '.$langs->trans('Ref').' | ';
- print ''.$commande->ref.' | ';
- print '
';
+ // Ref
+ print '| '.$langs->trans('Ref').' | ';
+ print ''.$commande->ref.' | ';
+ print '
';
- // Ref commande client
- print '| ';
- print '';
- print ' | ';
- if ($user->rights->commande->creer && $_GET['action'] == 'RefCustomerOrder')
+ // Ref commande client
+ print ' |
| ';
+ print '';
+ print ' | ';
+ if ($user->rights->commande->creer && $_GET['action'] == 'RefCustomerOrder')
+ {
+ print '';
+ }
+ else
+ {
+ print $commande->ref_client;
+ }
+ print ' | ';
+ print '
';
+
+
+ // Third party
+ print '| '.$langs->trans('Company').' | ';
+ print ''.$soc->getNomUrl(1,'compta').' | ';
+ print '
';
+
+ // Discounts for third party
+ print '| '.$langs->trans('Discounts').' | ';
+ if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
+ else print $langs->trans("CompanyHasNoRelativeDiscount");
+ $absolute_discount=$soc->getAvailableDiscounts('','fk_facture_source IS NULL');
+ $absolute_creditnote=$soc->getAvailableDiscounts('','fk_facture_source IS NOT NULL');
+ print '. ';
+ if ($absolute_discount)
+ {
+ if ($commande->statut > 0)
{
- print '';
+ print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
}
else
{
- print $commande->ref_client;
+ // Remise dispo de type non avoir
+ $filter='fk_facture_source IS NULL';
+ print ' ';
+ $html->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$commande->id,0,'remise_id',$soc->id,$absolute_discount,$filter);
}
- print ' | ';
- print '
';
+ }
+ if ($absolute_creditnote)
+ {
+ print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'. ';
+ }
+ if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
+ print '';
+
+ // Date
+ print '| '.$langs->trans('Date').' | ';
+ print ''.dolibarr_print_date($commande->date,'daytext').' | ';
+ print ''.$langs->trans('Source').' : '.$commande->getLabelSource();
+ if ($commande->source == 0)
+ {
+ // Si source = propal
+ $propal = new Propal($db);
+ $propal->fetch($commande->propale_id);
+ print ' -> '.$propal->ref.'';
+ }
+ print ' | ';
+ print '
';
+
+ // Date de livraison
+ print '| ';
+ print '';
+ print ' | ';
+ if ($_GET['action'] == 'editdate_livraison')
+ {
+ print '';
+ }
+ else
+ {
+ print dolibarr_print_date($commande->date_livraison,'daytext');
+ }
+ print ' | ';
+ print ''.$langs->trans('NotePublic').' : ';
+ print nl2br($commande->note_public);
+ print ' | ';
+ print '
';
- // Société
- print '| '.$langs->trans('Company').' | ';
- print ''.$soc->getNomUrl(1,'compta').' | ';
- print '
';
+ // Adresse de livraison
+ print '';
+ print '| ';
+ print $langs->trans('DeliveryAddress');
+ print ' | ';
- // Ligne info remises tiers
- print ' | '.$langs->trans('Discounts').' | ';
- if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
- else print $langs->trans("CompanyHasNoRelativeDiscount");
- $absolute_discount=$soc->getAvailableDiscounts('','fk_facture_source IS NULL');
- $absolute_creditnote=$soc->getAvailableDiscounts('','fk_facture_source IS NOT NULL');
- print '. ';
- if ($absolute_discount)
- {
- if ($commande->statut > 0)
- {
- print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
- }
- else
- {
- // Remise dispo de type non avoir
- $filter='fk_facture_source IS NULL';
- print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$commande->id,0,'remise_id',$soc->id,$absolute_discount,$filter);
- }
- }
- if ($absolute_creditnote)
- {
- print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'. ';
- }
- if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
- print ' | ';
+ if (1 == 2 && $_GET['action'] != 'editdelivery_adress' && $commande->brouillon) print 'socid.'&id='.$commande->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).' | ';
+ print ' ';
+ print ' | ';
- // Date
- print ' |
| '.$langs->trans('Date').' | ';
- print ''.dolibarr_print_date($commande->date,'daytext').' | ';
- print ''.$langs->trans('Source').' : '.$commande->getLabelSource();
- if ($commande->source == 0)
- {
- // Si source = propal
- $propal = new Propal($db);
- $propal->fetch($commande->propale_id);
- print ' -> '.$propal->ref.'';
- }
- print ' | ';
- print '
';
+ if ($_GET['action'] == 'editdelivery_adress')
+ {
+ $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id);
+ }
+ else
+ {
+ $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id);
+ }
+ print '';
- // Date de livraison
+ // Conditions et modes de règlement
+ print '| ';
+ print '';
+ print ' | ';
+ if ($_GET['action'] == 'editconditions')
+ {
+ $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'cond_reglement_id');
+ }
+ else
+ {
+ $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'none');
+ }
+ print ' |
';
+ print '| ';
+ print '';
+ print ' | ';
+ if ($_GET['action'] == 'editmode')
+ {
+ $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->mode_reglement_id,'mode_reglement_id');
+ }
+ else
+ {
+ $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->mode_reglement_id,'none');
+ }
+ print ' |
';
+
+ // Projet
+ if ($conf->projet->enabled)
+ {
+ $langs->load('projects');
print '| ';
print '';
print ' | ';
- if ($_GET['action'] == 'editdate_livraison')
+ if ($_GET['action'] == 'classer')
{
- print '';
+ $html->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->projet_id, 'projetid');
}
else
{
- print dolibarr_print_date($commande->date_livraison,'daytext');
- }
- print ' | ';
- print ''.$langs->trans('NotePublic').' : ';
- print nl2br($commande->note_public);
- print ' | ';
- print '
';
-
-
- // Adresse de livraison
- print '| ';
- print '';
- print ' | ';
-
- if ($_GET['action'] == 'editdelivery_adress')
- {
- $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id);
- }
- else
- {
- $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id);
+ $html->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->projet_id, 'none');
}
print ' |
';
+ }
- // Conditions et modes de règlement
- print '| ';
- print '';
- print ' | ';
- if ($_GET['action'] == 'editconditions')
- {
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'cond_reglement_id');
- }
- else
- {
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'none');
- }
- print ' |
';
- print '| ';
- print '';
- print ' | ';
- if ($_GET['action'] == 'editmode')
- {
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->mode_reglement_id,'mode_reglement_id');
- }
- else
- {
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->mode_reglement_id,'none');
- }
- print ' |
';
+ // Total HT
+ print '| '.$langs->trans('AmountHT').' | ';
+ print ''.price($commande->total_ht).' | ';
+ print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
- // Projet
- if ($conf->projet->enabled)
- {
- $langs->load('projects');
- print '| ';
- print '';
- print ' | ';
- if ($_GET['action'] == 'classer')
- {
- $html->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->projet_id, 'projetid');
- }
- else
- {
- $html->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->projet_id, 'none');
- }
- print ' |
';
- }
+ // Total TVA
+ print '| '.$langs->trans('AmountVAT').' | '.price($commande->total_tva).' | ';
+ print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
- // Lignes de 3 colonnes
+ // Total TTC
+ print '| '.$langs->trans('AmountTTC').' | '.price($commande->total_ttc).' | ';
+ print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
- // Total HT
- print '| '.$langs->trans('AmountHT').' | ';
- print ''.price($commande->total_ht).' | ';
- print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
+ // Statut
+ print '| '.$langs->trans('Status').' | ';
+ print ''.$commande->getLibStatut(4).' | ';
+ print '
';
- // Total TVA
- print '| '.$langs->trans('AmountVAT').' | '.price($commande->total_tva).' | ';
- print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
-
- // Total TTC
- print '| '.$langs->trans('AmountTTC').' | '.price($commande->total_ttc).' | ';
- print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
-
- // Statut
- print '| '.$langs->trans('Status').' | ';
- print ''.$commande->getLibStatut(4).' | ';
- print '
';
-
- print '
';
+ print '