';
echo 'compute_all_ledger();';
echo '';
}
+ else if ( isset ($_GET['create_invoice']))
+ {
+ $array=$Ledger->convert_from_follow($_GET ['ag_id']);
+ echo HtmlInput::hidden("ledger_type","VEN");
+ echo HtmlInput::hidden("ac",$_REQUEST['ac']);
+ echo HtmlInput::hidden("sa","p");
+ echo $Ledger->input($array);
+ echo '
';
+ echo $Ledger->input_paid();
+ echo '
';
+ echo '';
+ }
else
{
echo HtmlInput::hidden("ledger_type","VEN");
diff --git a/include/template/action_other_action.php b/include/template/action_other_action.php
index 7941042ee..386a084d8 100644
--- a/include/template/action_other_action.php
+++ b/include/template/action_other_action.php
@@ -8,7 +8,7 @@
* Hidden values for a previous search
*/
echo HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remind_date","sag_ref", "remind_date","only_internal", "state", "gDossier", "qcode", "start_date", "end_date", "ag_id", "ag_dest_query",
- "tdoc", "query","date_start","date_end","hsstate","searchtag"));
+ "tdoc", "action_query","date_start","date_end","hsstate","searchtag"));
?>
diff --git a/include/template/action_search.php b/include/template/action_search.php
index 207d5ed63..2fc373807 100644
--- a/include/template/action_search.php
+++ b/include/template/action_search.php
@@ -108,7 +108,7 @@
input()?> |
|
-
|
+
|
|
diff --git a/include/template/detail-action.php b/include/template/detail-action.php
index 7ebaf94b8..b11b5680a 100644
--- a/include/template/detail-action.php
+++ b/include/template/detail-action.php
@@ -351,12 +351,25 @@ function toggleShowDetail() {
Total TVA
Total TVAC
-
+ag_id != 0 && ! $readonly) : ?>
+
+
+ Dossier::id(),'ag_id'=>$this->ag_id,'create_invoice'=>1,'ac'=>'VEN'));
+ echo HtmlInput::button_anchor("Transformer en facture","do.php?".$query,"create_invoice", "","button");
+ ?>
+
+
+