87 |
|
|
88 |
llxHeader(); |
llxHeader(); |
89 |
|
|
90 |
$form = new Form($db); |
$html = new Form($db); |
91 |
|
|
92 |
/* |
/* |
93 |
* |
* |
94 |
* Mode fiche |
* Mode fiche |
95 |
* |
* |
96 |
*/ |
*/ |
97 |
if ($_GET["propalid"]) |
if ($_GET["propalid"] > 0) |
98 |
{ |
{ |
99 |
|
if ($msg) print "$msg<br>"; |
100 |
|
|
101 |
$propal = new Propal($db); |
$propal = new Propal($db); |
102 |
$propal->fetch($_GET["propalid"]); |
$propal->fetch($_GET["propalid"]); |
103 |
$h=0; |
$h=0; |
155 |
|
|
156 |
print '<table class="border" width="100%">'; |
print '<table class="border" width="100%">'; |
157 |
$rowspan=6; |
$rowspan=6; |
158 |
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'; |
|
159 |
|
// Société |
160 |
|
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="5">'; |
161 |
if ($societe->client == 1) |
if ($societe->client == 1) |
162 |
{ |
{ |
163 |
$url ='fiche.php?socid='.$societe->id; |
$url ='fiche.php?socid='.$societe->id; |
167 |
$url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$societe->id; |
$url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$societe->id; |
168 |
} |
} |
169 |
print '<a href="'.$url.'">'.$societe->nom.'</a></td>'; |
print '<a href="'.$url.'">'.$societe->nom.'</a></td>'; |
|
print '<td align="left">Conditions de réglement</td>'; |
|
|
print '<td>'.' '.'</td>'; |
|
170 |
print '</tr>'; |
print '</tr>'; |
171 |
|
|
172 |
|
// Dates |
173 |
print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'; |
print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'; |
174 |
print dolibarr_print_date($propal->date,'%a %d %B %Y'); |
print dolibarr_print_date($propal->date,'%a %d %B %Y'); |
175 |
print '</td>'; |
print '</td>'; |
187 |
print '</td>'; |
print '</td>'; |
188 |
print '</tr>'; |
print '</tr>'; |
189 |
|
|
190 |
|
// Conditions et modes de réglement |
191 |
|
print '<tr><td>'; |
192 |
|
print '<table class="nobordernopadding" width="100%"><tr><td>'; |
193 |
|
print $langs->trans('PaymentConditions'); |
194 |
|
print '</td>'; |
195 |
|
if ($_GET['action'] != 'editconditions' && $prop->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&facid='.$prop->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>'; |
196 |
|
print '</tr></table>'; |
197 |
|
print '</td><td colspan="3">'; |
198 |
|
if ($_GET['action'] == 'editconditions') |
199 |
|
{ |
200 |
|
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$prop->id,$prop->cond_reglement_id,'cond_reglement_id'); |
201 |
|
} |
202 |
|
else |
203 |
|
{ |
204 |
|
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$prop->id,$prop->cond_reglement_id,'none'); |
205 |
|
} |
206 |
|
print '</td>'; |
207 |
|
print '<td width="25%">'; |
208 |
|
print '<table class="nobordernopadding" width="100%"><tr><td>'; |
209 |
|
print $langs->trans('PaymentMode'); |
210 |
|
print '</td>'; |
211 |
|
if ($_GET['action'] != 'editmode' && $prop->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&facid='.$prop->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>'; |
212 |
|
print '</tr></table>'; |
213 |
|
print '</td><td width="25%">'; |
214 |
|
if ($_GET['action'] == 'editmode') |
215 |
|
{ |
216 |
|
$html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$prop->id,$prop->mode_reglement_id,'mode_reglement_id'); |
217 |
|
} |
218 |
|
else |
219 |
|
{ |
220 |
|
$html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$prop->id,$prop->mode_reglement_id,'none'); |
221 |
|
} |
222 |
|
print '</td></tr>'; |
223 |
|
|
224 |
// Destinataire |
// Destinataire |
225 |
$langs->load('mails'); |
$langs->load('mails'); |
226 |
print '<tr>'; |
print '<tr>'; |
242 |
print '<td colspan="2">'; |
print '<td colspan="2">'; |
243 |
print '<form action="propal.php?propalid='.$propal->id.'" method="post">'; |
print '<form action="propal.php?propalid='.$propal->id.'" method="post">'; |
244 |
print '<input type="hidden" name="action" value="set_contact">'; |
print '<input type="hidden" name="action" value="set_contact">'; |
245 |
$form->select_contacts($societe->id, $propal->contactid, 'contactidp'); |
$html->select_contacts($societe->id, $propal->contactid, 'contactidp'); |
246 |
print '</td><td>'; |
print '</td><td>'; |
247 |
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; |
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; |
248 |
print '</form>'; |
print '</form>'; |
506 |
|
|
507 |
$var=true; |
$var=true; |
508 |
|
|
509 |
$form->show_documents('propal',$filename,$filedir,$urlsource,$genallowed,$delallowed); |
$html->show_documents('propal',$filename,$filedir,$urlsource,$genallowed,$delallowed); |
510 |
|
|
511 |
|
|
512 |
/* |
/* |