cn->exec_sql('delete from attr_value where jft_id=$1',array($ajnt[$i]['jft_id']));
+ $this->cn->exec_sql('delete from jnt_fic_att_value where jft_id=$1',array($ajnt[$i]['jft_id']));
+
+ }
+ $this->cn->commit();
+ }
+
static function test_me() {
$cn=new Database(dossier::id());
$a=new Fiche($cn);
diff --git a/include/class_html_input.php b/include/class_html_input.php
index 1c05cefdc..061b8ee6a 100755
--- a/include/class_html_input.php
+++ b/include/class_html_input.php
@@ -203,7 +203,7 @@ echo $string => property={'prop':'1','prop2':'2','prop3':'3'};
*/
static function button_anchor($p_label,$p_value,$p_name="") {
$str='&PHPSESSID='.$_REQUEST['PHPSESSID'];
- $r=sprintf(' %s ',
+ $r=sprintf(' %s ',
$p_name,
$p_value.$str,
$p_label);
diff --git a/include/class_pdf.php b/include/class_pdf.php
index 8228f0562..25df1c0b9 100644
--- a/include/class_pdf.php
+++ b/include/class_pdf.php
@@ -34,13 +34,14 @@ class PDF extends SFPDF {
var $dossier = "n/a";
var $date = "";
- public function PDF($p_cn = null, $orientation = 'P', $unit = 'mm', $format = 'A4') {
+ public function __construct ($p_cn = null, $orientation = 'P', $unit = 'mm', $format = 'A4') {
if($p_cn == null) die("No database connection. Abort.");
parent::SFPDF($orientation, $unit, $format);
$this->AddFont('DejaVu','','dejavusans.php',true);
$this->AddFont('DejaVu','B','dejavusansb.php',true);
+ $this->AddFont('DejaVu','BI','dejavusansbi.php',true);
$this->AddFont('DejaVuCond','','dejavusanscondensed.php',true);
$this->AddFont('DejaVuCond','B','dejavusanscondensedb.php',true);
date_default_timezone_set ('Europe/Paris');
@@ -64,7 +65,7 @@ class PDF extends SFPDF {
$this->Ln(20);
}
function Footer() {
- //Position at 1.5 cm from bottom
+ //Position at 2 cm from bottom
$this->SetY(-20);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
@@ -80,3 +81,42 @@ class PDF extends SFPDF {
}
}
+class PDFLand extends PDF {
+
+ public function __construct ($p_cn = null, $orientation = 'P', $unit = 'mm', $format = 'A4') {
+
+ if($p_cn == null) die("No database connection. Abort.");
+
+ parent::SFPDF('L', $unit, $format);
+ $this->AddFont('DejaVu','','dejavusans.php',true);
+ $this->AddFont('DejaVu','B','dejavusansb.php',true);
+ $this->AddFont('DejaVu','BI','dejavusansbi.php',true);
+ $this->AddFont('DejaVuCond','','dejavusanscondensed.php',true);
+ $this->AddFont('DejaVuCond','B','dejavusanscondensedb.php',true);
+ date_default_timezone_set ('Europe/Paris');
+
+ $this->cn = $p_cn;
+ $this->own = new own($this->cn);
+ $this->soc = $this->own->MY_NAME;
+ $this->date = date('d.m.Y');
+ }
+ function Header() {
+ //Arial bold 12
+ $this->SetFont('DejaVu', 'B', 10);
+ //Title
+ $this->Cell(0,10,$this->dossier, 'B', 0, 'C');
+ //Line break
+ $this->Ln(20);
+ }
+ function Footer() {
+ //Position at 2 cm from bottom
+ $this->SetY(-20);
+ //Arial italic 8
+ $this->SetFont('Arial', 'I', 8);
+ //Page number
+ $this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
+ $this->Ln(3);
+ // Created by PhpCompta
+ $this->Cell(0,8,'Created by Phpcompta, the most professional opensource accounting software http://www.phpcompta.eu',0,0,'C',false,'http://www.phpcompta.eu');
+ }
+}
\ No newline at end of file
diff --git a/include/fiche.inc.php b/include/fiche.inc.php
index 4192aa823..5b33dcbc0 100644
--- a/include/fiche.inc.php
+++ b/include/fiche.inc.php
@@ -234,6 +234,7 @@ if ( isset ( $_GET["action"]) ) {
if ( isset ($_GET["fiche"]) && $action=="vue"
&& ! isset ($_POST['add_fiche'])
&& ! isset ($_POST['update_fiche'])
+ && ! isset ($_POST['move'])
&& ! isset ($_POST['delete'])) {
$User->can_request(FICADD);
@@ -281,13 +282,17 @@ if ( isset ( $_GET["action"]) ) {
echo $fiche->Display($t);
echo HtmlInput::hidden("f_id",$_GET['fiche_id']);
if ( $write != 0 ) {
+ $iselect=new ISelect('move_to');
+ $iselect->value=$cn->make_array('select fd_id,fd_label from fiche_def '); //where frd_id='.$fiche->get_fiche_def_ref_id());
+
echo HtmlInput::submit("update_fiche","Mise à jour");
echo HtmlInput::submit("delete" ,"Effacer cette fiche");
+ echo HtmlInput::submit('move',_('Déplacer vers'));
+ echo $iselect->input();
}
$str="";
+ echo HtmlInput::button_anchor(_('Retour'),'?p_action=fiche&action=vue&'.$str_dossier.'&fiche='.$fiche->fiche_def.$str);
- echo ' ';
if ( $write != 0 ) echo '';
echo '';
$recherche=false;
@@ -374,9 +379,8 @@ if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) {
echo dossier::hidden().HtmlInput::phpsessid();
echo $fiche->blank($_POST['fiche']);
echo HtmlInput::submit("add_fiche","Ajout");
- echo ''.
- ' ';
-
+ echo HtmlInput::button_anchor(_('Annuler'),$url.'&fiche='.$_POST['fiche'].'&'.$str_dossier);
+
echo '';
}
@@ -448,6 +452,16 @@ if ( isset ($_POST["update_fiche"]) ) {
echo '';
$recherche=false;
}
+//--------------------------------------------------------------------------------
+// Move a card to a new category
+if ( isset($_POST['move'])){
+ echo '';
+ $fiche=new Fiche($cn,$_POST['f_id']);
+ $fiche->move_to($_POST['move_to']);
+ $fiche_def=new fiche_def($cn,$_GET['fiche']);
+ $fiche_def->myList();
+ echo '
';
+}
//--Search menu
if ( $recherche==true) {
ShowRecherche();
diff --git a/include/impress.inc.php b/include/impress.inc.php
index 8587ec971..ce53e0a00 100644
--- a/include/impress.inc.php
+++ b/include/impress.inc.php
@@ -40,7 +40,7 @@ $p_array=array(array ("?p_action=impress&type=jrn&".$str_dossier,_("Journaux")),
$default=( isset ($_GET['type']))?"?p_action=impress&type=".$_GET['type']."&$str_dossier":"";
-$result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' width="100%"');
+$result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' ');
echo $result;
echo "";
diff --git a/release-note b/release-note
index d4c1ea622..08b7b08ca 100644
--- a/release-note
+++ b/release-note
@@ -22,4 +22,12 @@ comptable à une autre. Typiquement, il s'agit d'un débit qui correspond à un
5 Impression : nouveau menu Categorie, vous permet de visualiser par catégorie de fiche
avec l'historique des opérations ou simplement le résumé.
-6 Ecriture directe (re) devient Opérations Diverses
\ No newline at end of file
+6 Ecriture directe (re) devient Opérations Diverses
+
+7 Ajout du lettrage dans la plupart des impressions
+
+8 Les PDF sont en unicode
+
+9 Extension : vérification du chemin
+
+10 Fiche : possibilité de déplacer les fiches dans une autre catégorie, attention les attributs n'existant pas dans la catégorie cible seront supprimés
\ No newline at end of file