diff options
Diffstat (limited to 'views/mods')
20 files changed, 797 insertions, 555 deletions
diff --git a/views/mods/mod_abo/mail_admin_stoprenewal_html.phtml b/views/mods/mod_abo/mail_admin_stoprenewal_html.phtml index e30f72b..3ab6a50 100644 --- a/views/mods/mod_abo/mail_admin_stoprenewal_html.phtml +++ b/views/mods/mod_abo/mail_admin_stoprenewal_html.phtml @@ -3,7 +3,9 @@ /**
* Template für die Mail, die der Admin bekommt wenn ein Kunde ein Abo im Frontend anhalten möchte (HTML)
*/
-
+
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');7
+
?>
<?php echo __('Hallo Administrator,', 'wpsg'); ?><br />
diff --git a/views/mods/mod_abo/mail_expiration_html.phtml b/views/mods/mod_abo/mail_expiration_html.phtml index 33d7f7e..f64e364 100644 --- a/views/mods/mod_abo/mail_expiration_html.phtml +++ b/views/mods/mod_abo/mail_expiration_html.phtml @@ -4,6 +4,8 @@ * Mail die beim Auslauf eines Abos versendet wird (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?><p><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,</p>
<p><?php echo __('ihr Abo ist ausgelaufen.', 'wpsg'); ?></p>
diff --git a/views/mods/mod_abo/mail_firstbuy_html.phtml b/views/mods/mod_abo/mail_firstbuy_html.phtml index ff365ad..20c807b 100644 --- a/views/mods/mod_abo/mail_firstbuy_html.phtml +++ b/views/mods/mod_abo/mail_firstbuy_html.phtml @@ -4,6 +4,8 @@ * Mailtemplate, welches beim erstmaligen Kauf eines Abos versendet wird (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?><p><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,</p>
<p><?php echo __('ihr Abo wurde erfolgreich aktiviert.', 'wpsg'); ?></p>
diff --git a/views/mods/mod_abo/mail_rebuy_html.phtml b/views/mods/mod_abo/mail_rebuy_html.phtml index 722c1a1..773b114 100644 --- a/views/mods/mod_abo/mail_rebuy_html.phtml +++ b/views/mods/mod_abo/mail_rebuy_html.phtml @@ -4,6 +4,8 @@ * Template für die Mail an den Kunden wenn ein Abo verlängert wurde (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?><p><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,</p>
<p><?php echo __('ihr Abo wurde erfolgreich verlängert.', 'wpsg'); ?></p>
diff --git a/views/mods/mod_abo/mail_row_html.phtml b/views/mods/mod_abo/mail_row_html.phtml index 4da00c9..3409b71 100644 --- a/views/mods/mod_abo/mail_row_html.phtml +++ b/views/mods/mod_abo/mail_row_html.phtml @@ -4,6 +4,8 @@ * Template für die Zeile eines Abo Produktes im HTML Template
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?>
<tr class="productrow productrow2 <?php echo ((($this->view['i'] % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos"> </td>
diff --git a/views/mods/mod_abo/mail_storno_html.phtml b/views/mods/mod_abo/mail_storno_html.phtml index e50d26e..06cea78 100644 --- a/views/mods/mod_abo/mail_storno_html.phtml +++ b/views/mods/mod_abo/mail_storno_html.phtml @@ -4,6 +4,8 @@ * Template für die Mail an den Kunden wenn ein Abo storniert wurde (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?><p><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,</p>
<?php if ($this->view['cancel_storno']) { ?>
diff --git a/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml index a7f3ea1..c3f135d 100644 --- a/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml +++ b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml @@ -2,6 +2,7 @@ /* Wichtig, da die Module sonst kein HTML zurückgeben */
$this->htmlMail = true;
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
?><?php $this->render(WPSG_PATH_VIEW.'/mailtemplates/html/html_head.phtml'); ?>
diff --git a/views/mods/mod_deliverynote/deliverymail_html.phtml b/views/mods/mod_deliverynote/deliverymail_html.phtml index 99573f8..2df62f1 100644 --- a/views/mods/mod_deliverynote/deliverymail_html.phtml +++ b/views/mods/mod_deliverynote/deliverymail_html.phtml @@ -4,6 +4,8 @@ * Template für die Mail an den Kunden (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?><p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['customer']['vname']; ?> <?php echo $this->view['customer']['name']; ?>,</p>
<p><?php echo wpsg_translate(__("Sie erhalten hiermit den Lieferschein mit der Nummer #1# für folgende Produkte.", "wpsg"), $this->view['dn']->lnr); ?></p>
diff --git a/views/mods/mod_deliverynote/deliverynote_pdf.phtml b/views/mods/mod_deliverynote/deliverynote_pdf.phtml index a554553..379db1d 100644 --- a/views/mods/mod_deliverynote/deliverynote_pdf.phtml +++ b/views/mods/mod_deliverynote/deliverynote_pdf.phtml @@ -35,18 +35,41 @@ $pdf->image($shop->callMod('wpsg_mod_deliverynote', 'getFilePath', array(''))."wpsg_deliverynote_bp.jpg", 0, 0, 210, 297, 'jpg');
}
-
-
+
+
if (file_exists($shop->callMod('wpsg_mod_deliverynote', 'getFilePath', array(''))."wpsg_deliverynote_logo.jpg"))
{
-
+
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_deliverynote', 'getFilePath', array(''))."wpsg_deliverynote_logo.jpg");
-
+
+ // Umrechnung von Inch zu Pixel
$wPix = (25.4 * $width) / 96;
$hPix = (25.4 * $height) / 96;
-
- $pdf->image($shop->callMod('wpsg_mod_deliverynote', 'getFilePath', array(''))."wpsg_deliverynote_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
-
+
+ $leftPos = 110 - $wPix;
+ $midPos = $wPix * 2.6 - $width / 2;
+ $rightPos = 210 - $wPix;
+
+ $abscissa = $rightPos;
+ $ordinate = 0;
+
+ $transparency = str_replace("%", "", $shop->get_option('wpsg_mod_deliverynote_logo_transparency'));
+ if($transparency !== "100") $transparency = str_replace(array("0", "00"), "", $transparency);
+
+ $alpha = 1;
+ if(!is_null($transparency) && $transparency !== "100") $alpha = "0.$transparency";
+ if(!is_null($transparency) && $transparency === "100") $alpha = $transparency;
+
+ $logo_pos = $shop->get_option('wpsg_mod_deliverynote_logo_position');
+
+ if(isset($logo_pos) && $logo_pos === "left") { $abscissa = $leftPos; $ordinate = 20; }
+ if(isset($logo_pos) && $logo_pos === "center") { $abscissa = $midPos; $ordinate = 20; }
+ if(isset($logo_pos) && $logo_pos === "right") { $abscissa = $rightPos; }
+
+ $pdf->SetAlpha($alpha);
+ $pdf->image($shop->callMod('wpsg_mod_deliverynote', 'getFilePath', array(''))."wpsg_deliverynote_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
+ $pdf->SetAlpha(1);
+
}
// Absenderadresszeile (Wird in der Konfiguration hinterlegt)
diff --git a/views/mods/mod_deliverynote/settings_edit.phtml b/views/mods/mod_deliverynote/settings_edit.phtml index 515e4c1..b5dbda6 100644 --- a/views/mods/mod_deliverynote/settings_edit.phtml +++ b/views/mods/mod_deliverynote/settings_edit.phtml @@ -7,104 +7,134 @@ ?>
<div>
- <ul class="nav nav-tabs" role="tablist">
- <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></a></li>
- <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Fußzeile', 'wpsg'); ?></a></li>
- <li role="presentation"><a href="#tab3" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Sonstiges', 'wpsg'); ?></a></li>
- </ul>
- <div class="tab-content">
- <div role="tabpanel" class="tab-pane active" id="tab1">
-
- <?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_adressrow', __('Adresszeile', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_adressrow'), array('help' => 'wpsg_mod_deliverynote_adressrow')); ?>
-
- <?php echo wpsg_drawForm_TextStart(); ?>
- <div style="position:relative;">
- <?php if ($this->view['wpsg_mod_deliverynote']['bp'] === false) { ?>
- <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
- <?php } else { ?>
- <a href="<?php echo $this->view['wpsg_mod_deliverynote']['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
- <?php } ?>
- <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_bp" data-wpsg-tip="mod_deliverynote_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_bp"></a>
- <input type="file" name="wpsg_mod_deliverynote_bp">
- <?php $strSuffix = ''; if ($this->view['wpsg_mod_deliverynote']['bp'] !== false) { $strSuffix = '
+ <ul class="nav nav-tabs" role="tablist">
+ <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></a></li>
+ <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Fußzeile', 'wpsg'); ?></a></li>
+ <li role="presentation"><a href="#tab3" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Sonstiges', 'wpsg'); ?></a></li>
+ </ul>
+ <div class="tab-content">
+ <div role="tabpanel" class="tab-pane active" id="tab1">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_adressrow', __('Adresszeile', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_adressrow'), array('help' => 'wpsg_mod_deliverynote_adressrow')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <div style="position:relative;">
+ <?php if ($this->view['wpsg_mod_deliverynote']['bp'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo $this->view['wpsg_mod_deliverynote']['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
+ <?php } ?>
+ <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_bp" data-wpsg-tip="mod_deliverynote_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_bp"></a>
+ <input type="file" name="wpsg_mod_deliverynote_bp">
+ <?php $strSuffix = ''; if ($this->view['wpsg_mod_deliverynote']['bp'] !== false) { $strSuffix = '
<label>
<input type="checkbox" name="wpsg_mod_deliverynote_bp_del" value="1" /> '.__('Löschen', 'wpsg').'
</label>';
echo __($strSuffix);
- } ?>
+ } ?>
</div>
- <?php echo wpsg_drawForm_TextEnd(__('Briefpapier (PDF/JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_deliverynote_bp')); ?>
-
- <?php echo wpsg_drawForm_TextStart(); ?>
- <div style="position:relative;">
- <?php if ($this->view['wpsg_mod_deliverynote']['logo'] === false) { ?>
- <p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
- <?php } else { ?>
- <a href="<?php echo $this->view['wpsg_mod_deliverynote']['logo']; ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
- <?php } ?>
- <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_logo" data-wpsg-tip="mod_deliverynote_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_logo"></a>
- <input type="file" name="wpsg_mod_deliverynote_logo">
- <?php $strSuffix = ''; if ($this->view['wpsg_mod_deliverynote']['logo'] !== false) { $strSuffix = '
- <label>
- <input type="checkbox" name="wpsg_mod_deliverynote_logo_del" value="1" /> '.__('Löschen', 'wpsg').'
- </label>';
+ <?php echo wpsg_drawForm_TextEnd(__('Briefpapier (PDF/JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_deliverynote_bp')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <div style="position:relative;">
+ <?php if ($this->view['wpsg_mod_deliverynote']['logo'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo stripslashes($this->view['wpsg_mod_deliverynote']['logo']); ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
+ <?php } ?>
+ <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_logo" data-wpsg-tip="mod_deliverynote_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_logo"></a>
+ <input type="file" name="wpsg_mod_deliverynote_logo">
+ <?php $logo_pos = $this->get_option("wpsg_mod_deliverynote_logo_position"); ?>
+ <?php $defaultAlign = !isset($logo_pos) || empty($logo_pos) ? "align-buttons-active" : ""; ?>
+
+ <?php $alignLeft = $logo_pos === 'left' ? "align-buttons-active" : ""; ?>
+ <?php $alignCenter = $logo_pos === 'center' ? "align-buttons-active" : ""; ?>
+ <?php $alignRight = $logo_pos === 'right' ? "align-buttons-active" : ""; ?>
+
+ <?php $logo_transparency = $this->get_option("wpsg_mod_deliverynote_logo_transparency") ?: "0%"; ?>
+
+ <?php $strSuffix = ''; if ($this->view['logo'] !== false) { $strSuffix = '
+ <div class="row">
+ <div class="col-md-4">
+ <div class="align-buttons">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-left '.$alignLeft.'" name="wpsg_mod_deliverynote_logo_position_left" value="" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo linksbündig ausrichten").'">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-center '.$alignCenter.'" name="wpsg_mod_deliverynote_logo_position_center" value="" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo zentrieren").'">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-right '.$alignRight.' '.$defaultAlign.'" name="wpsg_mod_deliverynote_logo_position_right" value="" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo rechtsbündig ausrichten").'">
+ </div>
+ </div>
+ <div class="col-md-8 logo-transparency">
+ <label>
+ <input type="text" name="wpsg_mod_deliverynote_logo_transparency" value="'.$logo_transparency.'" /> '.__('Logodeckkraft', 'wpsg').'
+ </label>
+ </div>
+ <div class="col-md-12">
+ <label>
+ <input type="checkbox" name="wpsg_mod_deliverynote_logo_del" value="1" /> '.__('Löschen', 'wpsg').'
+ </label>
+ </div>
+ </div>';
echo __($strSuffix);
} ?>
- </div>
- <?php echo wpsg_drawForm_TextEnd(__('Logo (JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_deliverynote_logo')); ?>
+
+ <button class="button wpsg_deliverynote_preview" style="float:right; margin-right:10px;" name="wpsg_deliverynote_preview" type="button">
+ <?php echo __("Vorschau", "wpsg"); ?>
+ </button>
+
+ </div>
+ <?php echo wpsg_drawForm_TextEnd(__('Logo (JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_deliverynote_logo')); ?>
<br />
<table class="table table-body-striped wpsg_mod_deliverynote_fieldtable">
- <thead>
- <tr>
- <th class="col_bezeichnung"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
- <th class="col_freitext"><?php echo __('Freitext', 'wpsg'); ?></th>
- <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
- <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
- <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
- <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
- <th class="col_action"></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($this->view['wpsg_mod_deliverynote']['fields'] as $f => $field_name) { ?>
- <tr>
- <td><?php echo wpsg_hspc($field_name); ?></td>
- <td>
- <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['text']); ?>" />
- </td>
- <td>
- <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['x']); ?>" />
- </td>
- <td>
- <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['y']); ?>" />
- </td>
- <td>
- <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['color']); ?>" />
- </td>
- <td>
- <select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
- <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "8")?'selected="selected"':''); ?> value="8">8</option>
- <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "9")?'selected="selected"':''); ?> value="9">9</option>
- <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "10")?'selected="selected"':''); ?> value="10">10</option>
- <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "11")?'selected="selected"':''); ?> value="11">11</option>
- <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "12")?'selected="selected"':''); ?> value="12">12</option>
- <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "13")?'selected="selected"':''); ?> value="13">13</option>
- <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "14")?'selected="selected"':''); ?> value="14">14</option>
- </select>
- </td>
- <td>
- <input type="checkbox" title="<?php echo __('Diese Checkbox aktivieren, damit die Textzeile verwendet wird.', 'wpsg'); ?>" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['aktiv']))?'checked="checked"':''); ?> />
- </td>
- </tr>
- <?php } ?>
- </tbody>
+ <thead>
+ <tr>
+ <th class="col_bezeichnung"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
+ <th class="col_freitext"><?php echo __('Freitext', 'wpsg'); ?></th>
+ <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
+ <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
+ <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
+ <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['wpsg_mod_deliverynote']['fields'] as $f => $field_name) { ?>
+ <tr>
+ <td><?php echo wpsg_hspc($field_name); ?></td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['text']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['x']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['y']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['color']); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "8")?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "9")?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "10")?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "11")?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "12")?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "13")?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "14")?'selected="selected"':''); ?> value="14">14</option>
+ </select>
+ </td>
+ <td>
+ <input type="checkbox" title="<?php echo __('Diese Checkbox aktivieren, damit die Textzeile verwendet wird.', 'wpsg'); ?>" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['aktiv']))?'checked="checked"':''); ?> />
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
</table>
<input class="button" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher? Ihre bisherigen Einstellungen gehen verloren!', 'wpsg'); ?>')) return false; else location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=<?php echo $_REQUEST['modul']; ?>&do=reset&noheader=1';" type="button" value="<?php echo __('Standardeinstellungen laden', 'wpsg'); ?>" />
- <br /><br />
+ <br /><br />
<div class="info">
<p style="line-height:none;">
@@ -115,16 +145,16 @@ <br />
- </div>
- <div role="tabpanel" class="tab-pane" id="tab2">
+ </div>
+ <div role="tabpanel" class="tab-pane" id="tab2">
- <div id="foottext_list"><?php echo $this->view['foottext_list']; ?></div>
+ <div id="foottext_list"><?php echo $this->view['foottext_list']; ?></div>
- <br />
+ <br />
- <a title="<?php echo __('Neue Fußzeile anlegen', 'wpsg'); ?>" href="" class="" onclick="return wpsg_addFooter();"><span class="glyphicon wpsg-glyphicon glyphicon-plus"></span><?php echo __('Neue Fußzeile anlegen.', 'wpsg'); ?></a>
+ <a title="<?php echo __('Neue Fußzeile anlegen', 'wpsg'); ?>" href="" class="" onclick="return wpsg_addFooter();"><span class="glyphicon wpsg-glyphicon glyphicon-plus"></span><?php echo __('Neue Fußzeile anlegen.', 'wpsg'); ?></a>
- <br /><br />
+ <br /><br />
<div class="info">
<p style="line-height:none;">
@@ -132,18 +162,18 @@ </p>
</div>
- </div>
- <div role="tabpanel" class="tab-pane" id="tab3">
+ </div>
+ <div role="tabpanel" class="tab-pane" id="tab3">
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_nrformat', __('Format der Lieferscheinnummer', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_nrformat'), array('help' => 'wpsg_mod_deliverynote_nrformat')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_nr', __('Start für Lieferscheinnummer', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_nr'), array('help' => 'wpsg_mod_deliverynote_nr')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_url', __('URL Für URL Benachrichtigung', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_url'), array('help' => 'wpsg_mod_deliverynote_url')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_url_standard', __('URL Benachrichtigung standardmäßig aktiv', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_url_standard'), array('help' => 'wpsg_mod_deliverynote_url_standard')); ?>
-
+
<?php if ($this->hasMod('wpsg_mod_produktattribute') == '1') {?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_produktattribute', __('Produktattribute auf dem Lieferschein anzeigen', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_produktattribute'), array('help' => 'wpsg_mod_deliverynote_produktattribute')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_produktattribute', __('Produktattribute auf dem Lieferschein anzeigen', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_produktattribute'), array('help' => 'wpsg_mod_deliverynote_produktattribute')); ?>
<?php }?>
-
+
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_hideCountry', __('Land auf Lieferschein verbergen', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_hideCountry'), array('help' => 'wpsg_mod_deliverynote_hideCountry')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_deliverynote_anr', __('Artikelnummer anzeigen', 'wpsg'), array(
'0' => __('Nicht anzeigen', 'wpsg'),
@@ -152,17 +182,61 @@ ), $this->get_option('wpsg_mod_deliverynote_anr'), array('help' => 'wpsg_mod_deliverynote_anr')); ?>
</div>
- </div>
+ </div>
</div>
<script type="text/javascript">/* <![CDATA[ */
/**
+ * Stellt sicher, dass immer nur ein Button der align-buttons die highlight Klasse hat
+ */
+ function handleLogoAlignClick(pressedEl)
+ {
+
+ if(pressedEl.hasClass("align-buttons-active")) return;
+ else
+ {
+
+ pressedEl.addClass("align-buttons-active");
+ pressedEl[0].value = pressedEl[0].value + " selected";
+
+ jQuery.each($(".logo-align-button"), function(index, element) {
+ if(element.classList.contains("align-buttons-active") && element !== pressedEl[0]){
+
+ var values = element.value.split(" ");
+ element.value = values[0];
+
+ element.classList.remove("align-buttons-active");
+
+ return false;
+
+ }
+ });
+
+ }
+
+ } // function handleLogoAlignClick()
+
+ /**
+ * Wird beim Klicken auf den Vorschau Button ausgelöst
+ */
+ function wpsg_deliverynote_preview()
+ {
+
+ let url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=orderAjax&noheader=1&wpsg_deliverynote_preview=1";
+
+ window.open(url, '_blank');
+
+ return false;
+
+ } // function wpsg_rechnungen_preview()
+
+ /**
* Wird beim anlegen einer neuen Fußzeile aufgerufen
- */
+ */
function wpsg_addFooter()
{
-
+
jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
jQuery.ajax( {
@@ -171,9 +245,9 @@ jQuery('#foottext_list').html(data);
}
} );
-
+
return false;
-
+
} // function wpsg_addFooter()
/**
@@ -181,11 +255,11 @@ */
function wpsg_removeFooter(foot_id)
{
-
+
if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Fußzeile löschen möchten?', 'wpsg'); ?>')) return false;
jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
+
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=removeFoottext&noheader=1',
data: {
@@ -195,18 +269,22 @@ jQuery('#foottext_list').html(data);
}
} );
-
+
return false;
} // function wpsg_removeFooter()
-
+
jQuery(document).ready(function() {
- jQuery('#wpsg_tab').wpsg_tab( {
+
+ jQuery('#wpsg_tab').wpsg_tab( {
'cookiename': 'wpsg_mod_deliverynote_tab',
'tab2': function() {
jQuery('.tablink').show();
}
} );
+
+ jQuery(".wpsg_deliverynote_preview").click(function(){ wpsg_deliverynote_preview(); });
+
} );
-/* ]]> */</script>
\ No newline at end of file + /* ]]> */</script>
\ No newline at end of file diff --git a/views/mods/mod_downloadplus/cronmail_html.phtml b/views/mods/mod_downloadplus/cronmail_html.phtml index bddc9d0..d38a7c8 100644 --- a/views/mods/mod_downloadplus/cronmail_html.phtml +++ b/views/mods/mod_downloadplus/cronmail_html.phtml @@ -4,6 +4,8 @@ * Template für die Mail, die bei erfolgreicher Individualisierung an den Admin gesendet wird (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?>
<p><?php echo __('Hallo Administrator,', 'wpsg'); ?></p>
diff --git a/views/mods/mod_downloadplus/pdfdownloadmail_html.phtml b/views/mods/mod_downloadplus/pdfdownloadmail_html.phtml index e089454..ee840b0 100644 --- a/views/mods/mod_downloadplus/pdfdownloadmail_html.phtml +++ b/views/mods/mod_downloadplus/pdfdownloadmail_html.phtml @@ -4,6 +4,8 @@ * Mail, die die PDF Downloads an den Kunden sendet (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?>
<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
diff --git a/views/mods/mod_downloadprodukte/zahlung_downloadprodukt_html.phtml b/views/mods/mod_downloadprodukte/zahlung_downloadprodukt_html.phtml index 9a87ffc..9da2986 100644 --- a/views/mods/mod_downloadprodukte/zahlung_downloadprodukt_html.phtml +++ b/views/mods/mod_downloadprodukte/zahlung_downloadprodukt_html.phtml @@ -1,4 +1,6 @@ -<p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['customer']['vname']; ?> <?php echo $this->view['customer']['name']; ?></p>
+<?php include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml'); ?>
+
+<p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['customer']['vname']; ?> <?php echo $this->view['customer']['name']; ?></p>
<p><?php echo __("Ihre Bezahlung zu der Bestellung", "wpsg"); ?> <?php echo $this->view['order']['onr'] ?> <?php echo __("ist bei uns eingegangen.", "wpsg"); ?></p>
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml index df12be0..10af5f1 100644 --- a/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml +++ b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml @@ -2,6 +2,8 @@ global $template_name, $template_betreff, $absender_name, $absender_email;
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
/**
* Betreff des Templates
*/
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml index eb78a7c..e101c74 100644 --- a/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml +++ b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml @@ -2,6 +2,8 @@ global $template_name, $template_betreff, $absender_name, $absender_email;
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
/**
* Betreff des Templates
*/
diff --git a/views/mods/mod_rechnungen/accountingmail_html.phtml b/views/mods/mod_rechnungen/accountingmail_html.phtml index cc3e23e..3208f4e 100644 --- a/views/mods/mod_rechnungen/accountingmail_html.phtml +++ b/views/mods/mod_rechnungen/accountingmail_html.phtml @@ -4,6 +4,8 @@ * Template für die Mail, die beim Schreiben einer Rechnungskorrektur optional an den Kunden versendet werden kann (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
//wpsg_debug($this->view);
?><p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,</p>
diff --git a/views/mods/mod_rechnungen/invoice_pdf.phtml b/views/mods/mod_rechnungen/invoice_pdf.phtml index 11c682e..8dd3a64 100644 --- a/views/mods/mod_rechnungen/invoice_pdf.phtml +++ b/views/mods/mod_rechnungen/invoice_pdf.phtml @@ -1,5 +1,5 @@ <?php
-
+
/**
* Template für die PDF Rechnung
*/
@@ -7,161 +7,182 @@ require_once WPSG_PATH_LIB.'fpdf/fpdf.php';
require_once WPSG_PATH_LIB.'fpdf/fpdi.php';
require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
-
+
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
-
+
// Positionierung der Absenderadresszeile
$absender_left = 25;
$absender_top = 50;
-
+
// Positionierung der Zieladress
- $adress_left = 25;
+ $adress_left = 25;
$adress_top = 55;
-
+
// Positionierung des Rechnungskopfes
$rdata_left = 25;
$rdata_top = 90;
-
+
// Positionierung der Produktdaten
$prod_left = 25;
$prod_top = 105;
// Anzahl an Produkten pro Seite
$prod_break = $this->get_option('wpsg_rechnungen_pdfperpage');
-
+
// Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
if ($this->get_option('wpsg_kleinunternehmer') == '1')
{
-
+
unset($this->view['basket']['mwst']);
-
+
}
-
+
if (!function_exists('AddRechnungPage'))
{
-
+
function AddRechnungPage($shop, $pdf)
{
-
+
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
-
+
$pdf->AddPage();
-
+
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf"))
{
-
- $pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
- $tplidx = $pdf->importPage(1, '/MediaBox');
- $pdf->useTemplate($tplidx, 0, 0, 210);
-
+
+ $pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
+ $tplidx = $pdf->importPage(1, '/MediaBox');
+ $pdf->useTemplate($tplidx, 0, 0, 210);
+
}
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg"))
{
- $pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
+ //$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
}
-
-
+
+
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg"))
{
-
+
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg");
-
- //wpsg_debug($width.":".$height);
-
- $wPix = (25.4 * $width) / 96;
- $hPix = (25.4 * $height) / 96;
-
- $pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
-
+
+ // Umrechnung von Inch zu Pixel
+ $wPix = (25.4 * (int)$width) / 96;
+ $hPix = (25.4 * (int)$height) / 96;
+
+ $leftPos = 110 - $wPix;
+ $midPos = $wPix * 2.6 - $width / 2;
+ $rightPos = 210 - $wPix;
+
+ $abscissa = $rightPos;
+ $ordinate = 0;
+
+ $transparency = str_replace("%", "", $shop->get_option('wpsg_rechnungen_logo_transparency'));
+ if($transparency !== "100") $transparency = str_replace(array("0", "00"), "", $transparency);
+
+ $alpha = 1;
+ if(!is_null($transparency) && $transparency !== "100") $alpha = "0.$transparency";
+ if(!is_null($transparency) && $transparency === "100") $alpha = $transparency;
+
+ $logo_pos = $shop->get_option('wpsg_rechnungen_logo_position');
+
+ if(isset($logo_pos) && $logo_pos === "left") { $abscissa = $leftPos; $ordinate = 20; }
+ if(isset($logo_pos) && $logo_pos === "center") { $abscissa = $midPos; $ordinate = 20; }
+ if(isset($logo_pos) && $logo_pos === "right") { $abscissa = $rightPos; }
+
+ $pdf->SetAlpha($alpha);
+ $pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
+ $pdf->SetAlpha(1);
+
}
-
+
// Absenderadresszeile (Wird in der Konfiguration hinterlegt)
$pdf->SetFont('Arial', '', 6);
- $pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $shop->view['data']['id']));
-
+ $pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $shop->view['data']['id']));
+
if (wpsg_getStr($shop->view['kunde']['kuerzel']) != "") $shop->view['kunde']['kuerzel'] = $shop->view['kunde']['kuerzel'].'-';
-
+
// Adresse des Kunden
- $pdf->SetFont('Arial', '', 12);
+ $pdf->SetFont('Arial', '', 12);
$pdf->Text($adress_left, $adress_top, $shop->view['kunde']['firma']);
$pdf->Text($adress_left, $adress_top + 5, $shop->view['kunde']['vname'].' '.$shop->view['kunde']['name']);
$pdf->Text($adress_left, $adress_top + 10, $shop->view['kunde']['strasse'].' '.wpsg_getStr($shop->view['kunde']['hausnr']));
$pdf->Text($adress_left, $adress_top + 15, $shop->view['kunde']['plz'].' '.$shop->view['kunde']['ort']);
if ($shop->get_option("wpsg_mod_rechnungen_hideCountry") == '0')
- $pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getInvoiceCountryName()));
-
- // Rechnungsdaten
+ $pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getInvoiceCountryName()));
+
+ // Rechnungsdaten
$pdf->SetFont('Arial', 'B', 16);
$pdf->Text($rdata_left, $rdata_top, $shop->view['title']);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Text($rdata_left, $rdata_top + 6, $shop->view['rnr']);
$pdf->SetFont('Arial', '', 9);
-
+
if (isset($shop->view['faelligkeitdatum']))
{
-
+
$pdf->Text($rdata_left + 35, $rdata_top, __("Fällig am", "wpsg"));
- $pdf->Text($rdata_left + 35, $rdata_top + 6, $shop->view['faelligkeitdatum']);
-
+ $pdf->Text($rdata_left + 35, $rdata_top + 6, (int)$shop->view['faelligkeitdatum']);
+
}
-
+
if (isset($shop->view['payment']))
{
-
+
$pdf->Text($rdata_left + 58, $rdata_top, __("Zahlungsbedingungen", "wpsg"));
$pdf->Text($rdata_left + 58, $rdata_top + 6, $shop->view['payment']);
-
+
}
-
+
$pdf->Text($rdata_left + 105, $rdata_top, __("Kunden-Nr", "wpsg"));
$pdf->Text($rdata_left + 105, $rdata_top + 6, (($shop->view['kunde']['knr'] != '')?$shop->view['kunde']['knr']:$shop->view['kunde']['id']));
-
+
$pdf->Text($rdata_left + 135, $rdata_top, __("Best. Nr.", "wpsg"));
$pdf->Text($rdata_left + 135, $rdata_top + 6, ((trim($shop->view['data']['onr']) != '')?$shop->view['data']['onr']:$shop->view['data']['id']));
-
- $pdf->Text($rdata_left + 155, $rdata_top, __("Datum", "wpsg"));
+
+ $pdf->Text($rdata_left + 155, $rdata_top, __("Datum", "wpsg"));
$pdf->Text($rdata_left + 155, $rdata_top + 6, $shop->view['rDatum']);
-
+
if ($shop->view['oOrder']->isInnerEu())
{
-
- $pdf->SetFont('Arial', '', 9);
+
+ $pdf->SetFont('Arial', '', 9);
$pdf->Text($adress_left, $rdata_top + 11.5, __("Innergemeinschaftliche Lieferung.", "wpsg"));
-
+
}
-
+
// Benutzerdefinierte Felder
$arTexte = $shop->callMod('wpsg_mod_rechnungen', 'getRechnungstexte', array($shop->view['data']['id']));
-
+
foreach ((array)$arTexte as $text)
{
-
+
if (isset($text['aktiv']) && $text['aktiv'] == 1)
{
-
+
$pdf->SetFont('Arial', 'B', ((intval($text['fontsize']) > 0)?intval($text['fontsize']):10));
$pdf->wpsg_SetTextColor($text['color']);
- $pdf->wpsg_MultiCell($text['x'], $text['y'], 5, $text['text']);
+ $pdf->wpsg_MultiCell($text['x'], $text['y'], 5, $text['text']);
$pdf->wpsg_SetTextColor("#000000");
-
+
}
-
+
}
-
+
}
-
+
}
//wpsg_debug($this->view); die();
- $pdf = new wpsg_fpdf();
+ $pdf = new wpsg_fpdf();
$pdf->SetAutoPageBreak(true, 5);
AddRechnungPage($this, $pdf);
-
+
$summe = 0;
-
+
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
foreach ($this->view['basket']['produkte'] as $p)
{
-
+
if (!$bKopf)
{
@@ -171,145 +192,145 @@ $pdf->setXY($prod_left + 10, $prod_top);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, "Name", 1, 0, 'L');
-
+
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
-
+
$pdf->setXY($prod_left + 97, $prod_top);
$pdf->Cell(15, 8, __("MwSt.", "wpsg"), 1, 0, 'C');
-
+
}
-
+
$pdf->setXY($prod_left + 112, $prod_top);
$pdf->Cell(15, 8, __("Menge", "wpsg"), 1, 0, 'C');
-
+
$pdf->setXY($prod_left + 127, $prod_top);
$pdf->Cell(25, 8, __("Einzelpreis", "wpsg"), 1, 0, 'R');
-
+
$pdf->setXY($prod_left + 152, $prod_top);
$pdf->Cell(25, 8, __("Gesamtpreis", "wpsg"), 1, 0, 'R');
-
- $offset = 8;
+
+ $offset = 8;
$bKopf = true;
-
+
}
-
+
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
-
+
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1')
{
-
+
$pdf->Cell(10, 8, $p['anr'], 0, 0, 'C');
-
+
}
else
{
-
+
$pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
-
+
}
/* Wenn Detailname vorhanden, wird der Detailname auf Rechnung verwendet */
$produkt_text = $this->getProductName($this->getProduktID($p['id']), true);
-
+
/* Falls Detailname vorhanden, wird jetzt der Produktname verwendet */
/* $produkt_text = $this->getProductName($this->getProduktID($p['id']), false); */
-
+
$produktBeschreibung = trim(strip_tags($p['beschreibung']));
-
+
if ($this->isOtherLang())
- {
-
+ {
+
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
-
+
if (is_array($trans_db) && sizeof($trans_db) > 0)
{
-
+
$produkt_text = $trans_db['name'];
$produktBeschreibung = trim(strip_tags($trans_db['beschreibung']));
-
+
}
-
+
}
-
+
$height = 0; // Höhe der Zeile für den Rahmen
-
+
$pdf->setXY($prod_left + 10, $prod_top + $offset);
-
+
// Produktvariablen
if ($this->hasMod('wpsg_mod_productvars') && $this->get_option("wpsg_mod_rechnungen_showpv") == "1")
{
-
+
$arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($this->view['data']['id'], $p['product_index']));
-
+
if (wpsg_isSizedArray($arPV))
{
-
- foreach ($arPV as $pv)
+
+ foreach ($arPV as $pv)
{
-
+
$produkt_text .= "\r\n".$pv['name'].': '.$pv['value'];
$height += 5;
-
+
}
-
+
}
-
+
}
- if ($this->get_option('wpsg_mod_rechnungen_anr') === '2')
- {
+ if ($this->get_option('wpsg_mod_rechnungen_anr') === '2')
+ {
- $anr = $this->getProductAnr($p['productkey']);
- $produkt_text .= "\r\n".wpsg_translate(__('Artikelnummer: #1#', 'wpsg'), $anr);
+ $anr = $this->getProductAnr($p['productkey']);
+ $produkt_text .= "\r\n".wpsg_translate(__('Artikelnummer: #1#', 'wpsg'), $anr);
- }
+ }
$produkt_text_cell_width = 102;
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
- $produkt_text_cell_width = 87;
+ $produkt_text_cell_width = 87;
}
-
+
$produkt_text_width = $pdf->GetStringWidth($produkt_text);
//$produkt_text_cell_width = (($this->arMwSt == "-1")?87:102);
-
+
$height += 5 * ceil($produkt_text_width / $produkt_text_cell_width) + 3;
-
+
$height_y = $pdf->getY();
$height = 2 + $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $offset + 1.5, 5, $produkt_text, 0, 'L', 0, $produkt_text_cell_width);
-
+
//$height += 3 + 5 + $pdf->getY() - $height_y;
//$pdf->Cell((($this->arMwSt == "-1")?102:87), 8, $produkt_text, 0, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
-
- $pdf->setXY($prod_left + 97, $prod_top + $offset);
+
+ $pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, (($this->view['basket']['noMwSt'] == '1')?'0.00 %':wpsg_ff($p['mwst_value'], '%')), 0, 0, 'C');
-
+
}
-
+
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, $p['menge'], 0, 0, 'C');
-
+
if (wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO)
{
$preis = $p['preis_netto'];
-
+
//TODO
}
else
{
$preis = $p['preis_brutto'];
}
-
+
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis, $this->get_option('wpsg_currency')), 0, 0, 'R');
-
+
$pdf->setXY($prod_left + 152, $prod_top + $offset);
- $pdf->Cell(25, 8, wpsg_ff($preis * $p['menge'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+ $pdf->Cell(25, 8, wpsg_ff($preis * $p['menge'], $this->get_option('wpsg_currency')), 0, 0, 'R');
/**
* Produktbeschreibung anzeigen Ja/Nein
@@ -317,23 +338,23 @@ $pBeschreibungHeight = 0;
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($p['beschreibung'])) != '')
{
-
- $produktBeschreibung = nl2br($produktBeschreibung);
+
+ $produktBeschreibung = nl2br($produktBeschreibung);
preg_match_all('/\<br \/\>/', $produktBeschreibung, $treffer);
$produktBeschreibung = strip_tags($produktBeschreibung);
-
- $pBeschreibungWidth = $pdf->getStringWidth($produktBeschreibung);
+
+ $pBeschreibungWidth = $pdf->getStringWidth($produktBeschreibung);
$pBeschreibungHeight = 5 * (ceil($pBeschreibungWidth / $produkt_text_cell_width) + @sizeof($treffer[0]));
-
+
$pdf->SetFont('Arial', 'I', 9);
-
+
$cellY = $pdf->getY();
- $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 1, 5, $produktBeschreibung, 0, 'L', 0, $produkt_text_cell_width);
+ $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 1, 5, $produktBeschreibung, 0, 'L', 0, $produkt_text_cell_width);
$pBeschreibungHeight = $pdf->getY() - $cellY - $height + 1;
$pdf->SetFont('Arial', '', 9);
-
- }
-
+
+ }
+
$height += $pBeschreibungHeight;
/**
@@ -341,110 +362,110 @@ */
if ($this->get_option('wpsg_rechnungen_produktattribute') == '1')
{
-
+
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['id'])));
-
+
foreach ($attributeInfo as $pa)
{
-
+
$pa_text = $pa['name'].': '.$pa['value'];
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, $pa_text, 0, 'L', 0, $produkt_text_cell_width);
-
+
}
- }
-
+ }
+
/**
- * Variante ?
+ * Variante ?
*/
if (preg_match('/pv_(.*)/', $p['productkey']))
{
-
+
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['productkey']));
- $height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);
-
+ $height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);
+
//$height += 5;
-
+
}
-
+
if ($this->hasMod('wpsg_mod_deliverynote'))
{
-
+
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
-
+
if (sizeof($arDN_order) > 1)
{
-
- $deliveryTimeProduct = $this->callMod('wpsg_mod_deliverynote', 'getProductDeliveryTime', array($this->view['data']['id'], $p['product_index']));
-
+
+ $deliveryTimeProduct = $this->callMod('wpsg_mod_deliverynote', 'getProductDeliveryTime', array($this->view['data']['id'], $p['product_index']));
+
if ($deliveryTimeProduct !== false)
{
-
+
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Lieferdatum: #1#', 'wpsg'), date('d.m.Y', $deliveryTimeProduct)), 0, 'L', 0, $produkt_text_cell_width);
-
+
}
-
+
}
-
+
}
-
+
// Jetzt die Rahmen zeichnen
$pdf->Rect($prod_left, $prod_top + $offset, 10, $height);
-
+
$pdf->Rect($prod_left + 10, $prod_top + $offset, ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), $height);
-
+
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
-
+
$pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
-
+
}
-
+
$pdf->Rect($prod_left + 112, $prod_top + $offset, 15, $height);
$pdf->Rect($prod_left + 127, $prod_top + $offset, 25, $height);
$pdf->Rect($prod_left + 152, $prod_top + $offset, 25, $height);
-
+
$offset += $height;
-
+
$pnr ++;
$count ++;
-
+
$summe += $p['price'] * $p['menge'];
-
- if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['produkte']) > ($pnr - 1)))
+
+ if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['produkte']) > ($pnr - 1)))
{
-
+
AddRechnungPage($this, $pdf);
$bKopf = false; $offset = 0; $count = 0;
-
+
}
-
+
} // produkte
-
+
// Gutschein
if ((isset($this->view['basket']['gs'])) && ($this->view['basket']['gs_value'] > 0))
{
-
+
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $this->view['basket']['gs']['code']), 1, 0, 'L');
-
+
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
-
+
$mwst = __('anteilig', 'wpsg');
-
+
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
-
+
}
-
+
$pdf->setXY($prod_left + 112, $prod_top + $offset);
- $pdf->Cell(15, 8, '1', 1, 0, 'C');
-
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
/*
if ($this->view['basket']['gs']['calc'] == 'w')
{
@@ -461,57 +482,57 @@ }
*/
-
+
$gs_value_einzel = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$gs_value_gesamt = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
-
+
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
-
+
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_gesamt, 1, 0, 'R');
-
- $offset += 8;
-
- }
-
+
+ $offset += 8;
+
+ }
+
// Versandkosten
if ($this->view['basket']['sum']['preis_shipping'] != '' && $this->view['basket']['sum']['preis_shipping'] != 0)
{
-
+
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
-
+
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
-
+
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
{
-
+
$mwst = 0;
-
+
}
else
{
-
+
if (isset($this->view['basket']['shipping']['tax_rata']) && $this->view['basket']['shipping']['tax_rata'] === true)
{
-
+
$mwst = __('anteilig', 'wpsg');
-
+
}
else
{
-
+
$mwst = wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '%');
$mwst = wpsg_ff($this->view['basket']['shipping']['tax_value'], '%');
-
+
}
-
+
/*
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst'] == '0')
{
@@ -526,23 +547,23 @@ }
*/
-
+
}
-
+
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
-
+
}
-
+
$pdf->setXY($prod_left + 112, $prod_top + $offset);
- $pdf->Cell(15, 8, '1', 1, 0, 'C');
-
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
-
+
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
-
+
$offset += 8;
// Zusammengesetzte Versandarten darstellen
@@ -584,44 +605,44 @@ }
*/
-
-
+
+
}
-
+
// Zahlungskosten
if ($this->view['basket']['sum']['preis_payment'] != '' && $this->view['basket']['sum']['preis_payment'] != 0)
{
-
+
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
-
+
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
-
+
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
{
$mwst = 0;
}
else
- {
-
+ {
+
if (isset($this->view['basket']['payment']['tax_rata']) && $this->view['basket']['payment']['tax_rata'] === true)
{
-
+
$mwst = __('anteilig', 'wpsg');
-
+
}
else
{
-
+
$mwst = wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '%');
-
+
}
-
+
/*
if ($this->arPayment[$this->view['data']['type_payment']]['mwst'] == '0')
{
@@ -636,31 +657,31 @@ }
*/
-
+
}
-
+
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
-
+
}
-
+
$pdf->setXY($prod_left + 112, $prod_top + $offset);
- $pdf->Cell(15, 8, '1', 1, 0, 'C');
-
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
-
+
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
-
+
$offset += 8;
-
+
}
-
+
// Gebühr
if (wpsg_tf(wpsg_getStr($this->view['storno_fee'])) > 0)
{
-
+
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
@@ -668,45 +689,45 @@ $label = __('Bearbeitungsgebühr', 'wpsg');
if (strpos($this->view['storno_fee'], '%') !== false) $label .= ' ('.wpsg_ff($this->view['storno_fee'], '%').')';
-
+
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $label, 1, 0, 'L');
-
+
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
-
+
if ($this->view['basket']['noMwSt'] == '1')
{
$mwst = 0;
}
else
- {
-
-
+ {
+
+
$mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
-
+
}
-
+
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
-
+
}
-
+
$pdf->setXY($prod_left + 112, $prod_top + $offset);
- $pdf->Cell(15, 8, '1', 1, 0, 'C');
-
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, '-'.wpsg_ff($this->view['storno_fee_value'], $this->get_option('wpsg_currency')), 1, 0, 'R');
-
+
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, '-'.wpsg_ff($this->view['storno_fee_value'], $this->get_option('wpsg_currency')), 1, 0, 'R');
-
+
$offset += 8;
-
+
}
-
+
$pdf->SetFont('Arial', '', 9);
-
+
if ($this->view['kunde']['ustidnr'] != "")
{
$offset += 10;
@@ -714,7 +735,7 @@ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
}
-
+
$offset += 10;
if ($this->get_option('wpsg_kleinunternehmer'))
{
@@ -724,75 +745,75 @@ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
-
+
}
else
{
-
+
if ($this->view['basket']['noMwSt'] == '1')
{
-
+
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 100, $prod_top + $offset, __("BRUTTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
-
+
$pdf->Text($prod_left + 100, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff(0, $this->get_option('wpsg_currency')), 0, 0, 'R');
-
+
}
- else
+ else
{
-
+
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg"));
-
+
$pdf->Text($prod_left + 100, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
-
+
if (sizeof($this->view['basket']['mwst']) >= 1)
{
-
+
foreach ($this->view['basket']['mwst'] as $mw)
{
-
+
$offset += 5;
$pdf->Text($prod_left + 100, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['value'], '%'));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
-
+
}
-
+
}
-
+
if (sizeof($this->view['basket']['mwst']) > 1)
{
-
+
$offset += 5;
$pdf->Text($prod_left + 100, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] - $this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
-
+
}
-
- }
-
+
+ }
+
}
-
+
// Rabatt
if ($this->view['basket']['sum']['preis_rabatt'] > 0)
{
-
+
$offset += 5;
-
+
$pdf->Text($prod_left + 100, $prod_top + $offset, __("Rabatt", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
-
+
}
-
+
$offset += 5;
$pdf->Text($prod_left + 100, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
@@ -800,55 +821,55 @@ if ($this->get_option('wpsg_kleinunternehmer') == '1')
{
-
- $pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset + 5, 5, $this->get_option('wpsg_kleinunternehmer_text'));
+
+ $pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset + 5, 5, $this->get_option('wpsg_kleinunternehmer_text'));
$offset += 15;
-
+
}
-
+
if ($this->hasMod('wpsg_mod_deliverynote'))
{
-
+
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
$delivery_date = $this->callMod('wpsg_mod_deliverynote', 'getDeliveryTime', array($this->view['data']['id']));
-
+
// Wenn es ein Gesamtlieferdatum gibt und nur einen Lieferschein, dann unter der Bestellung anzeigen
if ($delivery_date !== false && sizeof($arDN_order) == 1)
{
-
- $offset += 10;
-
+
+ $offset += 10;
+
$pdf->wpsg_MultiCell($prod_left, $prod_top + $offset, 5, wpsg_translate(__('Lieferung: #1#', 'wpsg'), date('d.m.Y', $delivery_date)));
$offset += 5;
-
+
}
-
+
}
-
+
$offset += 5;
-
+
if ($this->view['fussText'] != "")
{
-
+
//$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($this->view['fussText']));
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $this->view['fussText']);
$pdf->SetFont('Arial', 'B', 9);
- $offset += 10;
-
+ $offset += 10;
+
}
-
+
$shipping_adress = false;
if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id'])))
{
-
+
$pdf->setFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Lieferanschrift", "wpsg").":");
$offset += 5;
-
- $pdf->setFont('Arial', '', 9);
-
+
+ $pdf->setFont('Arial', '', 9);
+
$shipping_adress = "";
if ($this->view['data']['shipping_firma'] != "")
{
@@ -857,35 +878,35 @@ $shipping_adress .= $this->view['data']['shipping_vname'].' '.$this->view['data']['shipping_name']."\r\n";
$shipping_adress .= $this->view['data']['shipping_strasse']."\r\n";
//$shipping_adress .= $this->view['data']['shipping_land']['kuerzel'].'-';
-
+
$shipping_adress .= $this->view['data']['shipping_plz'].' '.$this->view['data']['shipping_ort']."\r\n";
$shipping_adress .= $this->view['data']['shipping_land']['name'];
-
-
+
+
$start = $pdf->getY();
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $shipping_adress, 0, 'L', 0, 100);
$offset += $pdf->getY() - $start;
-
+
$shipping_adress = true;
-
+
}
-
-
+
+
$offset += 5;
-
+
// Bestellvariablen
if ($this->hasMod('wpsg_mod_ordervars') && $this->get_option('wpsg_mod_rechnungen_showov') == '1')
{
-
- $bvars = @unserialize($this->view['data']['bvars']);
+
+ $bvars = @unserialize($this->view['data']['bvars']);
if (!is_array($bvars)) $bvars = array();
-
+
$strBVars = "";
foreach ($bvars as $bvars_id => $bvars_value)
{
-
+
$bvars = $this->db->fetchRow("SELECT * FROM `".wpsg_q(WPSG_TBL_ORDERVARS)."` WHERE `id` = '".wpsg_q($bvars_id)."' ORDER BY `pos` ASC, `id` ASC ");
-
+
if ($bvars['typ'] == "1") // Auswahl
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
@@ -896,45 +917,45 @@ }
else if ($bvars['typ'] == "3") // Checkbox
{
- if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
+ if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
}
-
- $bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
- $strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
-
+
+ $bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
+ $strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
+
}
-
- $pdf->SetFont('Arial', 'B', 9);
+
+ $pdf->SetFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Angaben während der Bestellung", "wpsg").":");
$pdf->SetFont('Arial', '', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $strBVars);
-
- }
-
+
+ }
+
if (!file_exists($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id']))))
{
-
+
mkdir($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])), 0777, true);
-
+
}
-
+
$this->callMods('wpsg_mod_rechnungen_pdf', array(&$pdf, &$this->view['data']['id'], &$this->view['preview'], &$this->view['invoice']));
-
+
$filename = $this->view['filename'].".pdf";
- ob_end_clean();
+ ob_end_clean();
if ($this->view['preview']) {
-
+
$pdf->Output($filename, 'I');
-
+
} else {
-
+
$pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])).$filename, 'F');
-
+
// Hier wird der Dateiname an FPD übergeben. Er soll sich aus der Rechnungsnummer ergeben, auch wenn das Dokument über die ID gespeichert ist.
if ($this->view['output'] === true) $pdf->Output($this->view['filename_out'], 'I');
-
- }
-
+
+ }
+
?>
\ No newline at end of file diff --git a/views/mods/mod_rechnungen/invoicemail_html.phtml b/views/mods/mod_rechnungen/invoicemail_html.phtml index 666035c..4a37f73 100644 --- a/views/mods/mod_rechnungen/invoicemail_html.phtml +++ b/views/mods/mod_rechnungen/invoicemail_html.phtml @@ -4,6 +4,8 @@ * Template für die Mail, die beim Schreiben einer Rechnung optional an den Kunden versendet werden kann (HTML)
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
/* Wichtig, da die Module sonst kein HTML zurückgeben */
$this->htmlMail = true;
diff --git a/views/mods/mod_rechnungen/settings_edit.phtml b/views/mods/mod_rechnungen/settings_edit.phtml index cbe4aa9..fb5b638 100644 --- a/views/mods/mod_rechnungen/settings_edit.phtml +++ b/views/mods/mod_rechnungen/settings_edit.phtml @@ -6,62 +6,94 @@ ?>
-<div>
- <ul class="nav nav-tabs" role="tablist">
- <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></a></li>
- <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Fußzeile', 'wpsg'); ?></a></li>
- <li role="presentation"><a href="#tab3" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Sonstiges', 'wpsg'); ?></a></li>
- </ul>
+<div>
+ <ul class="nav nav-tabs" role="tablist">
+ <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></a></li>
+ <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Fußzeile', 'wpsg'); ?></a></li>
+ <li role="presentation"><a href="#tab3" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Sonstiges', 'wpsg'); ?></a></li>
+ </ul>
<div class="tab-content">
<div id="tab1" role="tabpanel" class="tab-pane active" >
-
+
<?php echo wpsg_drawForm_Input('wpsg_rechnungen_adresszeile', __('Adresszeile', 'wpsg'), $this->get_option('wpsg_rechnungen_adresszeile')); ?>
-<!--
+ <!--
<div class="wpsg_hinweis"><?php echo __('Diese Zeile wird klein oberhalb der Kundenadresse platziert', 'wpsg'); ?></div>
<br />
--->
- <?php echo wpsg_drawForm_TextStart(); ?>
- <div style="position:relative;">
- <?php if ($this->view['bp'] === false) { ?>
- <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
- <?php } else { ?>
- <a href="<?php echo $this->view['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
- <?php } ?>
- <a style="float:right; position:relative;" class="glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_bp" data-wpsg-tip="mod_rechnung_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_bp"></a>
- <input type="file" name="wpsg_rechnungen_bp">
- <?php $strSuffix = ''; if ($this->view['bp'] !== false) { $strSuffix = '
+-->
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <div style="position:relative;">
+ <?php if ($this->view['bp'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo $this->view['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_bp" data-wpsg-tip="mod_rechnung_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_bp"></a>
+ <input type="file" name="wpsg_rechnungen_bp">
+ <?php $strSuffix = ''; if ($this->view['bp'] !== false) { $strSuffix = '
<label>
<input type="checkbox" name="wpsg_rechnungen_bp_del" value="1" /> '.__('Löschen', 'wpsg').'
</label>';
echo __($strSuffix);
- } ?>
- </div>
- <?php echo wpsg_drawForm_TextEnd(__('Briefpapier (PDF/JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_rechnungen_bp')); ?>
-
- <?php echo wpsg_drawForm_TextStart(); ?>
- <div style="position:relative;">
- <?php if ($this->view['logo'] === false) { ?>
- <p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
- <?php } else { ?>
- <a href="<?php echo $this->view['logo']; ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
- <?php } ?>
- <a style="float:right; position:relative;" class="glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_logo" data-wpsg-tip="mod_rechnung_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_logo"></a>
- <input type="file" name="wpsg_rechnungen_logo">
- <?php $strSuffix = ''; if ($this->view['logo'] !== false) { $strSuffix = '
- <label>
- <input type="checkbox" name="wpsg_rechnungen_logo_del" value="1" /> '.__('Löschen', 'wpsg').'
- </label>';
- echo __($strSuffix);
- } ?>
- </div>
- <?php echo wpsg_drawForm_TextEnd(__('Logo (JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_rechnungen_bp')); ?>
+ } ?>
+ </div>
+ <?php echo wpsg_drawForm_TextEnd(__('Briefpapier (PDF/JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_rechnungen_bp')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <div style="position:relative;">
+ <?php if ($this->view['logo'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo stripslashes($this->view['logo']); ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_logo" data-wpsg-tip="mod_rechnung_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_logo"></a>
+ <input type="file" name="wpsg_rechnungen_logo">
+
+ <?php $logo_pos = $this->get_option("wpsg_rechnungen_logo_position"); ?>
+ <?php $defaultAlign = !isset($logo_pos) || empty($logo_pos) ? "align-buttons-active" : ""; ?>
+
+ <?php $alignLeft = $logo_pos === 'left' ? "align-buttons-active" : ""; ?>
+ <?php $alignCenter = $logo_pos === 'center' ? "align-buttons-active" : ""; ?>
+ <?php $alignRight = $logo_pos === 'right' ? "align-buttons-active" : ""; ?>
-<!--
- <div class="wpsg_hinweis"><?php echo __('Das Briefpapier wird hinter die gesamte Seite gelegt, das Logo wird rechts oben auf jeder Seite platziert. (96 dpi)', 'wpsg'); ?></div>
+ <?php $logo_transparency = $this->get_option("wpsg_rechnungen_logo_transparency") ?: "0%"; ?>
+
+ <?php $strSuffix = ''; if ($this->view['logo'] !== false) { $strSuffix = '
+ <div class="row">
+ <div class="col-md-4">
+ <div class="align-buttons">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-left '.$alignLeft.'" name="wpsg_rechnungen_logo_position_left" value="" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo linksbündig ausrichten").'">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-center '.$alignCenter.'" name="wpsg_rechnungen_logo_position_center" value="" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo zentrieren").'">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-right '.$alignRight.' '.$defaultAlign.'" name="wpsg_rechnungen_logo_position_right" value="" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo rechtsbündig ausrichten").'">
+ </div>
+ </div>
+ <div class="col-md-8 logo-transparency">
+ <label>
+ <input type="text" name="wpsg_rechnungen_logo_transparency" value="'.$logo_transparency.'" /> '.__('Logodeckkraft', 'wpsg').'
+ </label>
+ </div>
+ <div class="col-md-12">
+ <label>
+ <input type="checkbox" name="wpsg_rechnungen_logo_del" value="1" /> '.__('Löschen', 'wpsg').'
+ </label>
+ </div>
+ </div>';
+ echo __($strSuffix);
+ } ?>
+
+ <button class="button wpsg_rechnungen_preview" style="float:right; margin-right:10px;" name="wpsg_rechnungen_preview" type="button">
+ <?php echo __("Vorschau", "wpsg"); ?>
+ </button>
+
+ </div>
+ <?php echo wpsg_drawForm_TextEnd(__('Logo (JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_rechnungen_bp')); ?>
+
+
+ <!--
+ <div class="wpsg_hinweis"><?php echo __('Das Briefpapier wird hinter die gesamte Seite gelegt, das Logo wird standardmäßig rechts oben auf jeder Seite platziert. (96 dpi)', 'wpsg'); ?></div>
<br />
--->
+-->
<table class="table table-body-striped wpsg_mod_deliverynote_fieldtable">
- <thead>
+ <thead>
<tr>
<th class="col_bezeichnung"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
<th class="col_freitext"><?php echo __('Freitext', 'wpsg'); ?></th>
@@ -71,75 +103,75 @@ <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
<th class="col_action"></th>
</tr>
- </thead>
- <tbody>
+ </thead>
+ <tbody>
<?php foreach ($this->view['fields'] as $f => $field_name) { ?>
- <tr>
- <td><?php echo wpsg_getStr($field_name); ?></td>
- <td>
- <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_getStr($this->view['arTexte'][$f]['text']); ?>" />
- </td>
- <td>
- <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_getStr($this->view['arTexte'][$f]['x']); ?>" />
- </td>
- <td>
- <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_getStr($this->view['arTexte'][$f]['y']); ?>" />
- </td>
- <td>
- <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_getStr($this->view['arTexte'][$f]['color']); ?>" />
- </td>
- <td>
- <select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
- <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "8")?'selected="selected"':''); ?> value="8">8</option>
- <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "9")?'selected="selected"':''); ?> value="9">9</option>
- <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "10")?'selected="selected"':''); ?> value="10">10</option>
- <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "11")?'selected="selected"':''); ?> value="11">11</option>
- <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "12")?'selected="selected"':''); ?> value="12">12</option>
- <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "13")?'selected="selected"':''); ?> value="13">13</option>
- <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "14")?'selected="selected"':''); ?> value="14">14</option>
-
- </select>
- </td>
- <td>
- <label><input type="checkbox" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$f]['aktiv']))?'checked="checked"':''); ?> /> <?php echo __("Aktiv", "wpsg"); ?></label>
- <a style="float:right; position:relative;" class="glyphicon glyphicon-question-sign" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_fieldconfig" data-wpsg-tip="mod_rechnung_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_fieldconfig"></a>
- </td>
- </tr>
+ <tr>
+ <td><?php echo wpsg_getStr($field_name); ?></td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_getStr($this->view['arTexte'][$f]['text']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_getStr($this->view['arTexte'][$f]['x']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_getStr($this->view['arTexte'][$f]['y']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_getStr($this->view['arTexte'][$f]['color']); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
+ <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "8")?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "9")?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "10")?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "11")?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "12")?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "13")?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo ((wpsg_getStr($this->view['arTexte'][$f]['fontsize']) == "14")?'selected="selected"':''); ?> value="14">14</option>
+
+ </select>
+ </td>
+ <td>
+ <label><input type="checkbox" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$f]['aktiv']))?'checked="checked"':''); ?> /> <?php echo __("Aktiv", "wpsg"); ?></label>
+ <a style="float:right; position:relative;" class="glyphicon glyphicon-question-sign" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_fieldconfig" data-wpsg-tip="mod_rechnung_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_fieldconfig"></a>
+ </td>
+ </tr>
<?php } ?>
- </tbody>
+ </tbody>
</table>
-
+
<br />
-
+
<input style="float:right;" class="button" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher? Ihre bisherigen Einstellungen gehen verloren!', 'wpsg'); ?>')) return false; else location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=<?php echo $_REQUEST['modul']; ?>&do=reset&noheader=1';" type="button" value="<?php echo __('Standardeinstellungen laden', 'wpsg'); ?>" />
-
+
<div class="info">
- <p style="line-height:none;">
+ <p style="line-height:normal;">
<?php echo __('Die Angaben für X (Abstand von Links) und Y (Abstand von Oben) werden in mm eingetragen.', 'wpsg'); ?><br />
- <?php echo __('Die Farbe wird im Hexadezimalformat angegeben (#FFFFFF für weiß, #000000 für schwarz).', 'wpsg'); ?>
+ <?php echo __('Die Farbe wird im Hexadezimalformat angegeben (#FFFFFF für weiß, #000000 für schwarz).', 'wpsg'); ?>
</p>
</div>
<br />
-
+
</div>
<div id="tab2" role="tabpanel" class="tab-pane" >
-
+
<div id="foottext_list"><?php echo $this->view['foottext_list']; ?></div>
- <br />
+ <br />
- <a title="<?php echo __('Neue Fußzeile anlegen', 'wpsg'); ?>" href="" class="" onclick="return wpsg_addFooter();"><span class="glyphicon wpsg-glyphicon glyphicon-plus"></span><?php echo __('Neue Fußzeile anlegen.', 'wpsg'); ?></a>
+ <a title="<?php echo __('Neue Fußzeile anlegen', 'wpsg'); ?>" href="" class="" onclick="return wpsg_addFooter();"><span class="glyphicon wpsg-glyphicon glyphicon-plus"></span><?php echo __('Neue Fußzeile anlegen.', 'wpsg'); ?></a>
- <br /><br />
+ <br /><br />
<div class="info">
- <p style="line-height:none;">
+ <p style="line-height:normal;">
<?php echo __('Hier können Sie Texte vordefinieren, die sie unter die Rechnung setzen können.', 'wpsg'); ?>
</p>
</div>
-
- </div>
+
+ </div>
<div id="tab3" role="tabpanel" class="tab-pane" >
-
- <?php echo wpsg_drawForm_Input('wpsg_rechnungen_url', __('URL Benachrichtigung', 'wpsg'), $this->get_option('wpsg_rechnungen_url'), array('help' => 'wpsg_rechnung_url')); ?>
+
+ <?php echo wpsg_drawForm_Input('wpsg_rechnungen_url', __('URL Benachrichtigung', 'wpsg'), $this->get_option('wpsg_rechnungen_url'), array('help' => 'wpsg_rechnung_url')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_auto', __('Rechnungserstellung', 'wpsg'), array(
'0' => __('Manuell', 'wpsg'),
'1' => __('Bei Bestellung', 'wpsg'),
@@ -148,11 +180,11 @@ <?php echo wpsg_drawForm_Input('wpsg_rechnungen_faelligkeit', __('Fälligkeit in Tagen', 'wpsg'), $this->get_option('wpsg_rechnungen_faelligkeit'), array('help' => 'wpsg_rechnungen_faelligkeit')); ?>
<?php echo wpsg_drawForm_Input('wpsg_rechnungen_pdfperpage', __('Anzahl an Produkten pro Seite (PDF)', 'wpsg'), $this->get_option('wpsg_rechnungen_pdfperpage'), array('help' => 'wpsg_rechnungen_pdfperpage')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_rechnungen_pbeschreibung', __('Produktbeschreibung auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_rechnungen_pbeschreibung'), array('help' => 'wpsg_rechnungen_pbeschreibung')); ?>
-
+
<?php if ($this->hasMod('wpsg_mod_produktattribute') == '1') {?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_rechnungen_produktattribute', __('Produktattribute auf der Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_rechnungen_produktattribute'), array('help' => 'wpsg_rechnungen_produktattribute')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_rechnungen_produktattribute', __('Produktattribute auf der Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_rechnungen_produktattribute'), array('help' => 'wpsg_rechnungen_produktattribute')); ?>
<?php }?>
-
+
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showgutschriftrechnung', __('Rechnungsnummer auf Rechnungskorrektur anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showgutschriftrechnung'), array('help' => 'wpsg_mod_rechnungen_showgutschriftrechnung')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showpv', __('Produktvariablen auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showpv'), array('help' => 'wpsg_mod_rechnungen_showpv')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showov', __('Bestellvariablen auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showov'), array('help' => 'wpsg_mod_rechnungen_showov')); ?>
@@ -168,44 +200,101 @@ '1' => __('In Spalte "Nr." zeigen', 'wpsg'),
'2' => __('Als extra Zeile anzeigen', 'wpsg')
), $this->get_option('wpsg_mod_rechnungen_anr'), array('help' => 'wpsg_mod_rechnungen_anr')); ?>
-
- <?php echo wpsg_drawForm_TextStart(); ?>
- <div class="info">
- <p style="line-height:none;">
- %nr% - <?php echo __('Fortlaufende Rechnungs- bzw. Rechnungskorrekturnummer', 'wpsg'); ?><br />
- %Jahr% - <?php echo __('Das aktuelle Jahr (4 Stellig)', 'wpsg'); ?><br />
- %Monat% - <?php echo __('Der aktuelle Monat (01 - 12)', 'wpsg'); ?><br />
- %Tag% - <?php echo __('Der Tag des Monats (01 - 31)', 'wpsg'); ?><br />
- </p>
- </div>
-
- <p style="line-height:none;"><?php echo __('Die Platzhalter können bei den Formatfeldern und dem Dateinamen verwendet werden. Der Platzhalter %nr% sollte dabei immer Verwendung finden.', 'wpsg'); ?></p>
-
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <div class="info">
+ <p style="line-height:normal;">
+ %nr% - <?php echo __('Fortlaufende Rechnungs- bzw. Rechnungskorrekturnummer', 'wpsg'); ?><br />
+ %Jahr% - <?php echo __('Das aktuelle Jahr (4 Stellig)', 'wpsg'); ?><br />
+ %Monat% - <?php echo __('Der aktuelle Monat (01 - 12)', 'wpsg'); ?><br />
+ %Tag% - <?php echo __('Der Tag des Monats (01 - 31)', 'wpsg'); ?><br />
+ </p>
+ </div>
+
+ <p style="line-height:normal;"><?php echo __('Die Platzhalter können bei den Formatfeldern und dem Dateinamen verwendet werden. Der Platzhalter %nr% sollte dabei immer Verwendung finden.', 'wpsg'); ?></p>
+
<?php echo wpsg_drawForm_TextEnd(__('Mögliche Platzhalter für Rechnungen und Rechnungskorrektur', 'wpsg'), array('noP' => true)); ?>
-
+
</div>
</div>
</div>
-
+
<script type="text/javascript">/* <![CDATA[ */
jQuery(document).ready(function() {
- jQuery('#wpsg_tab').wpsg_tab( {
+
+ jQuery('#wpsg_tab').wpsg_tab( {
'cookiename': 'wpsg_rechnungen_tab',
'tab2': function() {
jQuery('.tablink').show();
}
} );
+
+ let onloadActiveBtn = $(".align-buttons-active")[0];
+ if(onloadActiveBtn)
+ {
+ if(!onloadActiveBtn.value.includes("selected"))
+ onloadActiveBtn.value += " selected";
+ }
+
+ $(".wpsg_rechnungen_preview").click(function(){ wpsg_rechnungen_preview(); });
+
} );
+ /**
+ * Stellt sicher, dass immer nur ein Button der align-buttons die highlight Klasse hat
+ */
+ function handleLogoAlignClick(pressedEl)
+ {
+
+ if(pressedEl.hasClass("align-buttons-active")) return;
+ else
+ {
+
+ pressedEl.addClass("align-buttons-active");
+ pressedEl[0].value = pressedEl[0].value + " selected";
+
+ jQuery.each($(".logo-align-button"), function(index, element) {
+ if(element.classList.contains("align-buttons-active") && element !== pressedEl[0]){
+
+ var values = element.value.split(" ");
+ element.value = values[0];
+
+ element.classList.remove("align-buttons-active");
+
+ return false;
+
+ }
+ });
+
+ }
+
+ } // function handleLogoAlignClick()
+
+ // Verhindern der Weiterleitung nach dem Klick auf einen Align Button
+ $(".logo-align-button").click(function() { return false; });
+
+ /**
+ * Wird beim Klicken auf den Vorschau Button ausgelöst
+ */
+ function wpsg_rechnungen_preview()
+ {
+
+ let url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=orderAjax&noheader=1&wpsg_rechnungen_preview=1";
+
+ window.open(url, '_blank');
+
+ return false;
+
+ } // function wpsg_rechnungen_preview()
/**
* Wird beim anlegen einer neuen Fußzeile aufgerufen
- */
+ */
function wpsg_addFooter()
{
-
+
jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
jQuery.ajax( {
@@ -216,7 +305,7 @@ } );
return false;
-
+
} // function wpsg_addFooter()
/**
@@ -244,4 +333,4 @@ } // function wpsg_removeFooter()
-/* ]]> */</script>
\ No newline at end of file + /* ]]> */</script>
\ No newline at end of file diff --git a/views/mods/mod_surfaceproduct/mail_row.html.phtml b/views/mods/mod_surfaceproduct/mail_row.html.phtml index ca2fbc2..a0f5963 100644 --- a/views/mods/mod_surfaceproduct/mail_row.html.phtml +++ b/views/mods/mod_surfaceproduct/mail_row.html.phtml @@ -4,6 +4,8 @@ * Template für die Intergration der FlächenProdukt-Daten in die HTML Kunden- und Adminmail
*/
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?>
<tr class="productrow productrow2 <?php echo ((($i % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos"> </td>
|
