Line 72... |
Line 72... |
72 |
|
72 |
|
73 |
} );
|
73 |
} );
|
74 |
|
74 |
|
75 |
</script>
|
75 |
</script>
|
76 |
|
76 |
|
77 |
<div class="postbox" id="wpsg_rechnungen">
|
- |
|
78 |
<h3 class="wpsg_handlediv">
|
- |
|
79 |
<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
|
- |
|
80 |
<span><?php echo __('Rechnungen', 'wpsg'); ?></span>
|
- |
|
81 |
</h3>
|
- |
|
82 |
<div class="inside">
|
- |
|
83 |
|
- |
|
84 |
<?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) == 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_storno']) == 0) { ?>
|
- |
|
85 |
<p><?php echo __('Bisher keine Rechnungen geschrieben.', 'wpsg'); ?></p>
|
- |
|
86 |
<?php } else { ?>
|
- |
|
87 |
<table>
|
- |
|
88 |
<?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { ?>
|
- |
|
89 |
<tr>
|
- |
|
90 |
<td>#<?php echo (($r['rnr'] != '')?$r['rnr']:$r['gnr']); ?>
|
- |
|
91 |
|
- |
|
92 |
<?php if ($r['storno'] == "0000-00-00 00:00:00") { ?>
|
- |
|
93 |
<?php if ($r['gnr'] != "") { ?>
|
- |
|
94 |
<?php echo wpsg_translate(__('Rechnungskorrektur vom #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
|
- |
|
95 |
<?php } else { ?>
|
- |
|
96 |
<?php echo wpsg_translate(__('Rechnung geschrieben am #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
|
- |
|
97 |
<?php } ?>
|
- |
|
98 |
<?php } else { ?>
|
- |
|
99 |
<?php echo wpsg_translate(__("Rechnung storniert am #1#", "wpsg"), date("d.m.Y", $r['ts_storno'])); ?>
|
- |
|
100 |
<?php } ?>
|
- |
|
101 |
|
- |
|
102 |
</td>
|
- |
|
103 |
<td style="text-align:right;">
|
- |
|
104 |
|
- |
|
105 |
<?php
|
- |
|
106 |
|
- |
|
107 |
if ($r['rnr'] != "")
|
- |
|
108 |
{
|
- |
|
109 |
$rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'R'.$r['rnr'].'.pdf';
|
- |
|
110 |
}
|
- |
|
111 |
else if ($r['gnr'] != "")
|
- |
|
112 |
{
|
- |
|
113 |
$rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'G'.$r['gnr'].'.pdf';
|
- |
|
114 |
}
|
- |
|
115 |
|
- |
|
116 |
?>
|
- |
|
117 |
|
- |
|
118 |
<a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden möchten?', 'wpsg'); ?>')) return false;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>&do=copy"><?php echo __("Kopie senden", "wpsg"); ?></a>
|
- |
|
119 |
<a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_rechnungen&do=getRechnung&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a>
|
- |
|
120 |
|
- |
|
121 |
</td>
|
- |
|
122 |
</tr>
|
- |
|
123 |
<?php } ?>
|
- |
|
124 |
</table>
|
- |
|
125 |
<br />
|
- |
|
126 |
<?php } ?>
|
- |
|
127 |
|
- |
|
128 |
<?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) > 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_gesamt']) != sizeof($this->view['mod_rechnungen']['arRechnungen_storno'])) { ?>
|
- |
|
129 |
<fieldset style="border:1px solid #999999; width:100%;">
|
- |
|
130 |
<legend style="margin-left:7px; margin-right:10px;"><?php echo __("Bestellstorno: Rechnungskorrektur erstellen", "wpsg"); ?></legend>
|
- |
|
131 |
<div style="padding:10px;">
|
- |
|
132 |
<form id="storno_form" target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno">
|
- |
|
133 |
|
- |
|
134 |
<input type="hidden" name="send" value="1" />
|
- |
|
135 |
|
- |
|
136 |
<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '0');" type="radio" value="0" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift0" name="wpsg_rechnungen_gutschrift" /> <?php echo __("Rechnung komplett stornieren und keine Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
|
- |
|
137 |
<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '1');" type="radio" value="1" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift1" name="wpsg_rechnungen_gutschrift" /> <?php echo __("Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
|
- |
|
138 |
<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '2');" type="radio" value="2" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift2" name="wpsg_rechnungen_gutschrift" /> <?php echo __("Rechnungskorrektur erstellen und an Kunden senden.", "wpsg"); ?></label><br />
|
- |
|
139 |
|
- |
|
140 |
<div id="wpsg_mod_rechnungen_fee_layer" style="display:none;">
|
- |
|
141 |
<?php echo wpsg_drawForm_Input('wpsg_mod_rechnungen_fee', __('Gebühr für Rechnungskorrektur', 'wpsg'), ''); ?>
|
- |
|
142 |
</div>
|
- |
|
143 |
|
- |
|
144 |
<div class="wpsg_clear"></div><br />
|
- |
|
145 |
|
- |
|
146 |
<input onclick="return wpsg_mod_rechnungen_storno();" id="wpsg_rechnungen_stornobutton" class="button" type="submit" name="form_submit" value="<?php echo __("Stornieren", "wpsg"); ?>" style="float:right;" />
|
- |
|
147 |
<input id="wpsg_mod_rechnungen_stornopreview" class="button" type="submit" name="form_submit_preview" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:right; margin-right:10px;" />
|
- |
|
148 |
|
- |
|
149 |
<script type="text/javascript">
|
- |
|
150 |
|
- |
|
151 |
jQuery(document).ready(function() {
|
- |
|
152 |
|
- |
|
153 |
jQuery("[name=wpsg_rechnungen_gutschrift]").filter("[value=" + jQuery.cookie("wpsg_rechnungen_stornoradio") + "]").attr("checked","checked");
|
- |
|
154 |
|
- |
|
155 |
jQuery("#wpsg_rechnungen_stornobutton").bind("click", function() {
|
- |
|
156 |
|
- |
|
157 |
if (jQuery("#wpsg_rechnungen_gutschrift1").attr("checked") || jQuery("#wpsg_rechnungen_gutschrift2").attr("checked"))
|
- |
|
158 |
{
|
- |
|
159 |
|
- |
|
160 |
//jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
|
- |
|
161 |
jQuery("#storno_form").attr("target", "_blank");
|
- |
|
162 |
|
- |
|
163 |
window.setTimeout(function() {
|
- |
|
164 |
location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>";
|
- |
|
165 |
}, 1500);
|
- |
|
166 |
|
- |
|
167 |
}
|
- |
|
168 |
else
|
- |
|
169 |
{
|
- |
|
170 |
|
- |
|
171 |
//jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
|
- |
|
172 |
jQuery("#storno_form").attr("target", "");
|
- |
|
173 |
|
- |
|
174 |
}
|
- |
|
175 |
|
- |
|
176 |
});
|
- |
|
177 |
|
- |
|
178 |
});
|
- |
|
179 |
|
- |
|
180 |
</script>
|
- |
|
181 |
|
- |
|
182 |
</form>
|
- |
|
183 |
<div class="wpsg_hinweis"><?php echo __("Eine neue Rechnung kann erst geschrieben werden wenn alle bestehenden Rechnungen zu dieser Bestellung storniert wurden.", "wpsg"); ?></div>
|
- |
|
184 |
<div class="wpsg_clear"></div>
|
- |
|
185 |
</div>
|
- |
|
186 |
</fieldset>
|
- |
|
187 |
<?php } else { ?>
|
- |
|
188 |
|
- |
|
189 |
<fieldset style="border:1px solid #999999; width:100%;">
|
- |
|
190 |
<legend style="margin-left:10px; margin-right:10px;"><?php echo __("Neue Rechnung", "wpsg"); ?></legend>
|
- |
|
191 |
<div style="padding:5px;">
|
- |
|
192 |
|
- |
|
193 |
<form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&cmd=rechnung&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>">
|
- |
|
194 |
|
- |
|
195 |
<input type="hidden" name="send" value="1" />
|
- |
|
196 |
|
- |
|
197 |
<label style="height:25px; width:240px; float:left; margin-top:10px;">
|
- |
|
198 |
<input onchange="if (this.checked) jQuery('#wpsg_rechnungen_email').show(); else jQuery('#wpsg_rechnungen_email').hide();" type="checkbox" checked="checked" value="1" name="wpsg_rechnungen_sendmail" />
|
- |
|
199 |
<?php echo __("E-Mail an Kunden senden.", "wpsg"); ?>
|
- |
|
200 |
</label>
|
- |
|
201 |
<input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_email" name="wpsg_rechnungen_email" value="<?php echo wpsg_hspc($this->view['data']['email']); ?>" />
|
- |
|
202 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
203 |
|
- |
|
204 |
<label style="height:25px; width:240px; float:left;">
|
- |
|
205 |
<input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_faelligkeitsdatum').show(); else jQuery('#wpsg_rechnungen_faelligkeitsdatum').hide();" type="checkbox" value="1" name="wpsg_rechnungen_faelligkeit" />
|
- |
|
206 |
<?php echo __("Fälligkeit anzeigen.", "wpsg"); ?>
|
- |
|
207 |
</label>
|
- |
|
208 |
<input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_faelligkeitsdatum" name="wpsg_rechnungen_faelligkeitsdatum" value="<?php echo date("d.m.Y", time() + ($this->get_option("wpsg_rechnungen_faelligkeit") * 86400)); ?>" />
|
- |
|
209 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
210 |
|
- |
|
211 |
<label style="height:25px; width:220px; float:left;">
|
- |
|
212 |
<input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_status').show(); else jQuery('#wpsg_rechnungen_status').hide();" type="checkbox" value="1" name="wpsg_rechnungen_status" />
|
- |
|
213 |
<?php echo __("Neuer Status:", "wpsg"); ?>
|
- |
|
214 |
</label>
|
- |
|
215 |
<select style="width:300px; float:right;" id="wpsg_rechnungen_status_neu" name="wpsg_rechnungen_status_neu">
|
- |
|
216 |
<?php foreach ($this->arStatus as $k => $v) { ?>
|
- |
|
217 |
<option value="<?php echo $k; ?>" <?php echo (($k == 110)?'selected="selected"':''); ?>><?php echo $v; ?></option>
|
- |
|
218 |
<?php } ?>
|
- |
|
219 |
</select>
|
- |
|
220 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
221 |
|
- |
|
222 |
<label style="height:25px; width:240px; float:left;">
|
- |
|
223 |
<input <?php echo (($this->get_option("wpsg_rechnungen_url_std") === "1")?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_rechnungen_url" />
|
- |
|
224 |
<?php echo __("URL Benachrichtigung", "wpsg"); ?>
|
- |
|
225 |
</label>
|
- |
|
226 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
227 |
|
- |
|
228 |
<label style="height:25px; width:240px; float:left; padding-left:22px;">
|
- |
|
229 |
<?php echo __("Rechnungsdatum", "wpsg"); ?>:
|
- |
|
230 |
</label>
|
- |
|
231 |
<input style="display:block;float:right; width:300px;" type="text" name="wpsg_rechnungen_datum" value="<?php echo date("d.m.Y", time()); ?>" />
|
- |
|
232 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
233 |
|
- |
|
234 |
<label for="wpsg_rechnungen_fusstext" style="height:25px; width:220px; padding-left:22px; float:left">
|
- |
|
235 |
<?php echo __("Fußtext", "wpsg"); ?>
|
- |
|
236 |
</label>
|
- |
|
237 |
|
- |
|
238 |
<?php
|
- |
|
239 |
|
- |
|
240 |
$wpsg_rechnungen_footer = $this->get_option("wpsg_rechnungen_footer");
|
- |
|
241 |
if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = unserialize($this->get_option("wpsg_rechnungen_footer"));
|
- |
|
242 |
if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = Array();
|
- |
|
243 |
|
- |
|
244 |
?>
|
- |
|
245 |
|
- |
|
246 |
<?php if (sizeof($wpsg_rechnungen_footer) > 0) { ?>
|
- |
|
247 |
<select style="width:300px; float:right;" id="wpsg_rechnungen_select" onchange="jQuery('#wpsg_rechnungen_fusstext').val(this.value);">
|
- |
|
248 |
<?php foreach ($wpsg_rechnungen_footer as $k => $v) { ?>
|
- |
|
249 |
<option value="<?php echo wpsg_hspc($v[1]); ?>"><?php echo wpsg_hspc($v[0]); ?></option>
|
- |
|
250 |
<?php } ?>
|
- |
|
251 |
</select>
|
- |
|
252 |
<?php } ?>
|
- |
|
253 |
|
- |
|
254 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
255 |
<div style="padding-left:25px;"><input style="width:100%;" type="text" name="wpsg_rechnungen_fusstext" id="wpsg_rechnungen_fusstext" value="" /></div>
|
- |
|
256 |
<div style="clear:both; width:100%; height:15px;"></div>
|
- |
|
257 |
|
- |
|
258 |
<script type="text/javascript">
|
- |
|
259 |
|
- |
|
260 |
jQuery(document).ready(function() {
|
- |
|
261 |
jQuery('#wpsg_rechnungen_fusstext').val(jQuery("#wpsg_rechnungen_select").val());
|
- |
|
262 |
});
|
- |
|
263 |
|
- |
|
264 |
</script>
|
- |
|
265 |
|
- |
|
266 |
<input class="button" style="float:right;" onclick="window.setTimeout(function() { location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>'; }, 1000);" name="wpsg_rechnungen_write" type="submit" value="<?php echo __("Rechnung schreiben", "wpsg"); ?>" />
|
- |
|
267 |
<input class="button" style="float:right; margin-right:10px;" name="wpsg_rechnungen_preview" type="submit" value="<?php echo __("Vorschau", "wpsg"); ?>" />
|
- |
|
268 |
|
- |
|
269 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
270 |
|
- |
|
271 |
</form>
|
- |
|
272 |
</div>
|
- |
|
273 |
</fieldset>
|
- |
|
274 |
|
- |
|
275 |
<?php } ?>
|
- |
|
276 |
|
- |
|
277 |
</div>
|
- |
|
278 |
</div>
|
- |
|
279 |
|
77 |
<?php echo wpsg_drawForm_AdminboxStart(__('Rechnungen', 'wpsg')); ?>
|
- |
|
78 |
|
- |
|
79 |
<?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) == 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_storno']) == 0) { ?>
|
- |
|
80 |
<p><?php echo __('Bisher keine Rechnungen geschrieben.', 'wpsg'); ?></p>
|
- |
|
81 |
<?php } else { ?>
|
- |
|
82 |
<table>
|
- |
|
83 |
<?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { ?>
|
- |
|
84 |
<tr>
|
- |
|
85 |
<td>#<?php echo (($r['rnr'] != '')?$r['rnr']:$r['gnr']); ?>
|
- |
|
86 |
|
- |
|
87 |
<?php if ($r['storno'] == "0000-00-00 00:00:00") { ?>
|
- |
|
88 |
<?php if ($r['gnr'] != "") { ?>
|
- |
|
89 |
<?php echo wpsg_translate(__('Rechnungskorrektur vom #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
|
- |
|
90 |
<?php } else { ?>
|
- |
|
91 |
<?php echo wpsg_translate(__('Rechnung geschrieben am #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
|
- |
|
92 |
<?php } ?>
|
- |
|
93 |
<?php } else { ?>
|
- |
|
94 |
<?php echo wpsg_translate(__("Rechnung storniert am #1#", "wpsg"), date("d.m.Y", $r['ts_storno'])); ?>
|
- |
|
95 |
<?php } ?>
|
- |
|
96 |
|
- |
|
97 |
</td>
|
- |
|
98 |
<td style="text-align:right;">
|
- |
|
99 |
|
- |
|
100 |
<?php
|
- |
|
101 |
|
- |
|
102 |
if ($r['rnr'] != "")
|
- |
|
103 |
{
|
- |
|
104 |
$rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'R'.$r['rnr'].'.pdf';
|
- |
|
105 |
}
|
- |
|
106 |
else if ($r['gnr'] != "")
|
- |
|
107 |
{
|
- |
|
108 |
$rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'G'.$r['gnr'].'.pdf';
|
- |
|
109 |
}
|
- |
|
110 |
|
- |
|
111 |
?>
|
- |
|
112 |
|
- |
|
113 |
<a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden möchten?', 'wpsg'); ?>')) return false;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>&do=copy"><?php echo __("Kopie senden", "wpsg"); ?></a>
|
- |
|
114 |
<a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_rechnungen&do=getRechnung&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a>
|
- |
|
115 |
|
- |
|
116 |
</td>
|
- |
|
117 |
</tr>
|
- |
|
118 |
<?php } ?>
|
- |
|
119 |
</table>
|
- |
|
120 |
<br />
|
- |
|
121 |
<?php } ?>
|
- |
|
122 |
|
- |
|
123 |
<?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) > 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_gesamt']) != sizeof($this->view['mod_rechnungen']['arRechnungen_storno'])) { ?>
|
- |
|
124 |
<fieldset style="border:1px solid #999999; width:100%;">
|
- |
|
125 |
<legend style="margin-left:7px; margin-right:10px;"><?php echo __("Bestellstorno: Rechnungskorrektur erstellen", "wpsg"); ?></legend>
|
- |
|
126 |
<div style="padding:10px;">
|
- |
|
127 |
<form id="storno_form" target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno">
|
- |
|
128 |
|
- |
|
129 |
<input type="hidden" name="send" value="1" />
|
- |
|
130 |
|
- |
|
131 |
<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '0');" type="radio" value="0" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift0" name="wpsg_rechnungen_gutschrift" /> <?php echo __("Rechnung komplett stornieren und keine Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
|
- |
|
132 |
<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '1');" type="radio" value="1" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift1" name="wpsg_rechnungen_gutschrift" /> <?php echo __("Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
|
- |
|
133 |
<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '2');" type="radio" value="2" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift2" name="wpsg_rechnungen_gutschrift" /> <?php echo __("Rechnungskorrektur erstellen und an Kunden senden.", "wpsg"); ?></label><br />
|
- |
|
134 |
|
- |
|
135 |
<div id="wpsg_mod_rechnungen_fee_layer" style="display:none;">
|
- |
|
136 |
<?php echo wpsg_drawForm_Input('wpsg_mod_rechnungen_fee', __('Gebühr für Rechnungskorrektur', 'wpsg'), ''); ?>
|
- |
|
137 |
</div>
|
- |
|
138 |
|
- |
|
139 |
<div class="wpsg_clear"></div><br />
|
- |
|
140 |
|
- |
|
141 |
<input onclick="return wpsg_mod_rechnungen_storno();" id="wpsg_rechnungen_stornobutton" class="button" type="submit" name="form_submit" value="<?php echo __("Stornieren", "wpsg"); ?>" style="float:right;" />
|
- |
|
142 |
<input id="wpsg_mod_rechnungen_stornopreview" class="button" type="submit" name="form_submit_preview" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:right; margin-right:10px;" />
|
- |
|
143 |
|
- |
|
144 |
<script type="text/javascript">
|
- |
|
145 |
|
- |
|
146 |
jQuery(document).ready(function() {
|
- |
|
147 |
|
- |
|
148 |
jQuery("[name=wpsg_rechnungen_gutschrift]").filter("[value=" + jQuery.cookie("wpsg_rechnungen_stornoradio") + "]").attr("checked","checked");
|
- |
|
149 |
|
- |
|
150 |
jQuery("#wpsg_rechnungen_stornobutton").bind("click", function() {
|
- |
|
151 |
|
- |
|
152 |
if (jQuery("#wpsg_rechnungen_gutschrift1").attr("checked") || jQuery("#wpsg_rechnungen_gutschrift2").attr("checked"))
|
- |
|
153 |
{
|
- |
|
154 |
|
- |
|
155 |
//jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
|
- |
|
156 |
jQuery("#storno_form").attr("target", "_blank");
|
- |
|
157 |
|
- |
|
158 |
window.setTimeout(function() {
|
- |
|
159 |
location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>";
|
- |
|
160 |
}, 1500);
|
- |
|
161 |
|
- |
|
162 |
}
|
- |
|
163 |
else
|
- |
|
164 |
{
|
- |
|
165 |
|
- |
|
166 |
//jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
|
- |
|
167 |
jQuery("#storno_form").attr("target", "");
|
- |
|
168 |
|
- |
|
169 |
}
|
- |
|
170 |
|
- |
|
171 |
});
|
- |
|
172 |
|
- |
|
173 |
});
|
- |
|
174 |
|
- |
|
175 |
</script>
|
- |
|
176 |
|
- |
|
177 |
</form>
|
- |
|
178 |
<div class="wpsg_hinweis"><?php echo __("Eine neue Rechnung kann erst geschrieben werden wenn alle bestehenden Rechnungen zu dieser Bestellung storniert wurden.", "wpsg"); ?></div>
|
- |
|
179 |
<div class="wpsg_clear"></div>
|
- |
|
180 |
</div>
|
- |
|
181 |
</fieldset>
|
- |
|
182 |
<?php } else { ?>
|
- |
|
183 |
|
- |
|
184 |
<fieldset>
|
- |
|
185 |
<legend><?php echo __("Neue Rechnung", "wpsg"); ?></legend>
|
- |
|
186 |
|
- |
|
187 |
<div>
|
- |
|
188 |
|
- |
|
189 |
<form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&cmd=rechnung&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>">
|
- |
|
190 |
|
- |
|
191 |
<input type="hidden" name="send" value="1" />
|
- |
|
192 |
|
- |
|
193 |
<label style="height:25px; width:240px; float:left; margin-top:10px;">
|
- |
|
194 |
<input onchange="if (this.checked) jQuery('#wpsg_rechnungen_email').show(); else jQuery('#wpsg_rechnungen_email').hide();" type="checkbox" checked="checked" value="1" name="wpsg_rechnungen_sendmail" />
|
- |
|
195 |
<?php echo __("E-Mail an Kunden senden.", "wpsg"); ?>
|
- |
|
196 |
</label>
|
- |
|
197 |
<input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_email" name="wpsg_rechnungen_email" value="<?php echo wpsg_hspc($this->view['data']['email']); ?>" />
|
- |
|
198 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
199 |
|
- |
|
200 |
<label style="height:25px; width:240px; float:left;">
|
- |
|
201 |
<input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_faelligkeitsdatum').show(); else jQuery('#wpsg_rechnungen_faelligkeitsdatum').hide();" type="checkbox" value="1" name="wpsg_rechnungen_faelligkeit" />
|
- |
|
202 |
<?php echo __("Fälligkeit anzeigen.", "wpsg"); ?>
|
- |
|
203 |
</label>
|
- |
|
204 |
<input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_faelligkeitsdatum" name="wpsg_rechnungen_faelligkeitsdatum" value="<?php echo date("d.m.Y", time() + ($this->get_option("wpsg_rechnungen_faelligkeit") * 86400)); ?>" />
|
- |
|
205 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
206 |
|
- |
|
207 |
<label style="height:25px; width:220px; float:left;">
|
- |
|
208 |
<input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_status').show(); else jQuery('#wpsg_rechnungen_status').hide();" type="checkbox" value="1" name="wpsg_rechnungen_status" />
|
- |
|
209 |
<?php echo __("Neuer Status:", "wpsg"); ?>
|
- |
|
210 |
</label>
|
- |
|
211 |
<select style="width:300px; float:right;" id="wpsg_rechnungen_status_neu" name="wpsg_rechnungen_status_neu">
|
- |
|
212 |
<?php foreach ($this->arStatus as $k => $v) { ?>
|
- |
|
213 |
<option value="<?php echo $k; ?>" <?php echo (($k == 110)?'selected="selected"':''); ?>><?php echo $v; ?></option>
|
- |
|
214 |
<?php } ?>
|
- |
|
215 |
</select>
|
- |
|
216 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
217 |
|
- |
|
218 |
<label style="height:25px; width:240px; float:left;">
|
- |
|
219 |
<input <?php echo (($this->get_option("wpsg_rechnungen_url_std") === "1")?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_rechnungen_url" />
|
- |
|
220 |
<?php echo __("URL Benachrichtigung", "wpsg"); ?>
|
- |
|
221 |
</label>
|
- |
|
222 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
223 |
|
- |
|
224 |
<label style="height:25px; width:240px; float:left; padding-left:22px;">
|
- |
|
225 |
<?php echo __("Rechnungsdatum", "wpsg"); ?>:
|
- |
|
226 |
</label>
|
- |
|
227 |
<input style="display:block;float:right; width:300px;" type="text" name="wpsg_rechnungen_datum" value="<?php echo date("d.m.Y", time()); ?>" />
|
- |
|
228 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
229 |
|
- |
|
230 |
<label for="wpsg_rechnungen_fusstext" style="height:25px; width:220px; padding-left:22px; float:left">
|
- |
|
231 |
<?php echo __("Fußtext", "wpsg"); ?>
|
- |
|
232 |
</label>
|
- |
|
233 |
|
- |
|
234 |
<?php
|
- |
|
235 |
|
- |
|
236 |
$wpsg_rechnungen_footer = $this->get_option("wpsg_rechnungen_footer");
|
- |
|
237 |
if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = unserialize($this->get_option("wpsg_rechnungen_footer"));
|
- |
|
238 |
if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = Array();
|
- |
|
239 |
|
- |
|
240 |
?>
|
- |
|
241 |
|
- |
|
242 |
<?php if (sizeof($wpsg_rechnungen_footer) > 0) { ?>
|
- |
|
243 |
<select style="width:300px; float:right;" id="wpsg_rechnungen_select" onchange="jQuery('#wpsg_rechnungen_fusstext').val(this.value);">
|
- |
|
244 |
<?php foreach ($wpsg_rechnungen_footer as $k => $v) { ?>
|
- |
|
245 |
<option value="<?php echo wpsg_hspc($v[1]); ?>"><?php echo wpsg_hspc($v[0]); ?></option>
|
- |
|
246 |
<?php } ?>
|
- |
|
247 |
</select>
|
- |
|
248 |
<?php } ?>
|
- |
|
249 |
|
- |
|
250 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
251 |
<div style="padding-left:25px;"><input style="width:100%;" type="text" name="wpsg_rechnungen_fusstext" id="wpsg_rechnungen_fusstext" value="" /></div>
|
- |
|
252 |
<div style="clear:both; width:100%; height:15px;"></div>
|
- |
|
253 |
|
- |
|
254 |
<script type="text/javascript">
|
- |
|
255 |
|
- |
|
256 |
jQuery(document).ready(function() {
|
- |
|
257 |
jQuery('#wpsg_rechnungen_fusstext').val(jQuery("#wpsg_rechnungen_select").val());
|
- |
|
258 |
});
|
- |
|
259 |
|
- |
|
260 |
</script>
|
- |
|
261 |
|
- |
|
262 |
<input class="button" style="float:right;" onclick="window.setTimeout(function() { location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>'; }, 1000);" name="wpsg_rechnungen_write" type="submit" value="<?php echo __("Rechnung schreiben", "wpsg"); ?>" />
|
- |
|
263 |
<input class="button" style="float:right; margin-right:10px;" name="wpsg_rechnungen_preview" type="submit" value="<?php echo __("Vorschau", "wpsg"); ?>" />
|
- |
|
264 |
|
- |
|
265 |
<div style="clear:both; width:100%; height:5px;"></div>
|
- |
|
266 |
|
- |
|
267 |
</form>
|
- |
|
268 |
</div>
|
- |
|
269 |
</fieldset>
|
- |
|
270 |
|
- |
|
271 |
<?php } ?>
|
- |
|
272 |
|
- |
|
273 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
- |
|
274 |
|
280 |
|
275 |
|