Generation of pdf become default value
This commit is contained in:
parent
2caeafc03b
commit
cf0d67d71c
@ -1098,10 +1098,17 @@ if ($action == 'create')
|
|||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Auto generate document
|
// Auto generate document
|
||||||
|
if (! empty($conf->global->INVOICE_REC_CAN_DISABLE_DOCUMENT_FILE_GENERATION))
|
||||||
|
{
|
||||||
print "<tr><td>".$langs->trans("StatusOfGeneratedDocuments")."</td><td>";
|
print "<tr><td>".$langs->trans("StatusOfGeneratedDocuments")."</td><td>";
|
||||||
$select = array('0'=>$langs->trans('DoNotGenerateDoc'),'1'=>$langs->trans('AutoGenerateDoc'));
|
$select = array('0'=>$langs->trans('DoNotGenerateDoc'),'1'=>$langs->trans('AutoGenerateDoc'));
|
||||||
print $form->selectarray('generate_pdf', $select, GETPOST('generate_pdf'));
|
print $form->selectarray('generate_pdf', $select, GETPOST('generate_pdf'));
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="generate_pdf" value="1">';
|
||||||
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
@ -1512,12 +1519,16 @@ else
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Auto generate documents
|
// Auto generate documents
|
||||||
print '<tr><td>';
|
if (! empty($conf->global->INVOICE_REC_CAN_DISABLE_DOCUMENT_FILE_GENERATION))
|
||||||
|
{
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>';
|
||||||
if ($action == 'generate_pdf' || $object->frequency > 0)
|
if ($action == 'generate_pdf' || $object->frequency > 0)
|
||||||
print $form->editfieldkey($langs->trans("StatusOfGeneratedDocuments"), 'generate_pdf', $object->generate_pdf, $object, $user->rights->facture->creer);
|
print $form->editfieldkey($langs->trans("StatusOfGeneratedDocuments"), 'generate_pdf', $object->generate_pdf, $object, $user->rights->facture->creer);
|
||||||
else
|
else
|
||||||
print $langs->trans("StatusOfGeneratedDocuments");
|
print $langs->trans("StatusOfGeneratedDocuments");
|
||||||
print '</td><td>';
|
print '</td>';
|
||||||
|
print '<td>';
|
||||||
$select = 'select;0:'.$langs->trans('DoNotGenerateDoc').',1:'.$langs->trans('AutogenerateDoc');
|
$select = 'select;0:'.$langs->trans('DoNotGenerateDoc').',1:'.$langs->trans('AutogenerateDoc');
|
||||||
if ($action == 'generate_pdf' || $object->frequency > 0)
|
if ($action == 'generate_pdf' || $object->frequency > 0)
|
||||||
{
|
{
|
||||||
@ -1525,6 +1536,11 @@ else
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="generate_pdf" value="1">';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td align="center"><?php echo dol_print_date($objectlink->date_contrat,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($objectlink->date_contrat,'day'); ?></td>
|
||||||
<td align="right"> </td>
|
<td align="right"><?php // var_dump($objectlink->total_ttc); ?></td>
|
||||||
<td align="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
<td align="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
||||||
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -544,7 +544,7 @@ ALTER TABLE llx_product ADD COLUMN accountancy_code_sell_intra varchar(32) AFTER
|
|||||||
ALTER TABLE llx_product ADD COLUMN accountancy_code_sell_export varchar(32) AFTER accountancy_code_sell_intra;
|
ALTER TABLE llx_product ADD COLUMN accountancy_code_sell_export varchar(32) AFTER accountancy_code_sell_intra;
|
||||||
|
|
||||||
ALTER TABLE llx_facture_rec ADD COLUMN modelpdf varchar(255) AFTER note_public;
|
ALTER TABLE llx_facture_rec ADD COLUMN modelpdf varchar(255) AFTER note_public;
|
||||||
ALTER TABLE llx_facture_rec ADD COLUMN generate_pdf integer DEFAULT 0 AFTER auto_validate;
|
ALTER TABLE llx_facture_rec ADD COLUMN generate_pdf integer DEFAULT 1 AFTER auto_validate;
|
||||||
|
|
||||||
-- SPEC : use database type 'double' to store monetary values
|
-- SPEC : use database type 'double' to store monetary values
|
||||||
ALTER TABLE llx_blockedlog MODIFY COLUMN amounts double(24,8);
|
ALTER TABLE llx_blockedlog MODIFY COLUMN amounts double(24,8);
|
||||||
|
|||||||
@ -72,5 +72,5 @@ create table llx_facture_rec
|
|||||||
nb_gen_done integer DEFAULT NULL, -- nb of generation done (when an invoice is generated, this field must incremented)
|
nb_gen_done integer DEFAULT NULL, -- nb of generation done (when an invoice is generated, this field must incremented)
|
||||||
nb_gen_max integer DEFAULT NULL, -- maximum number of generation
|
nb_gen_max integer DEFAULT NULL, -- maximum number of generation
|
||||||
auto_validate integer DEFAULT 0, -- 0 to create in draft, 1 to create and validate the new invoice
|
auto_validate integer DEFAULT 0, -- 0 to create in draft, 1 to create and validate the new invoice
|
||||||
generate_pdf integer DEFAULT 0 -- 0 disable pdf, 1 to generate pdf
|
generate_pdf integer DEFAULT 1 -- 0 disable pdf, 1 to generate pdf
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -513,4 +513,5 @@ ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template inv
|
|||||||
CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order)
|
CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order)
|
||||||
BillCreated=%s bill(s) created
|
BillCreated=%s bill(s) created
|
||||||
StatusOfGeneratedDocuments=Status of document generation
|
StatusOfGeneratedDocuments=Status of document generation
|
||||||
AutogenerateDoc=Auto generate document
|
DoNotGenerateDoc=Do not generate document file
|
||||||
|
AutogenerateDoc=Auto generate document file
|
||||||
Loading…
Reference in New Issue
Block a user