<%QUERY Customer(customer_id=$customer_id) DO DISPLAY
%>From: $Shop.service_email
To: $Customer.email
Subject: [%ORDERRETURN_STATE_UPD Statusuppdatering av retur%] $return_no
<%CALL CONTENT_TYPE('multipart/alternative; boundary="F5gLoYNuko1moleVFdbwulSGh9aXAo3XvCDawtB"')%>

--F5gLoYNuko1moleVFdbwulSGh9aXAo3XvCDawtB
Content-Type: text/plain; charset=$Shop.charset
Content-Transfer-Encoding: 8bit

[%ORDER_RETURN_STATE_CHNG Din retur har ndrat status frn%] <%
IF $old_state THEN
 QUERY OrderReturnStates(state=$old_state) DO DISPLAY
 $Data.old_state_name = $[TR]state_name
%>$[TR]state_name<%NEXTROW ENDQUERY ENDIF%> [%TO till%] <%
IF $new_state THEN
 QUERY OrderReturnStates(state=$new_state) DO DISPLAY
 $Data.new_state_name = $[TR]state_name
 $Data.mail_msg = $mail_msg
%>$[TR]state_name.

<%IF $mail_msg THEN
    $mail_msg=CALL EXEC($mail_msg)%>
    $mail_msg
<%ENDIF
  
NEXTROW ENDQUERY ENDIF%>

$return_response

------------------------------------------------------------

[%CUSTOMER_SERVICE Kundtjnst%]:
$Shop.company
$Shop.address $Shop.address2		
$Shop.zip $Shop.city			
<%MSG("COUNTRY_"+$Shop.ccode)%>

[%TELEPHONE_SHORT Tel%]: $Shop.service_phone
[%EMAIL E-post%]: $Shop.service_email
<%IF $Shop.VATno THEN%>[%VAT_REG_NUMBER Regnr fr moms%]: $Shop.VATno<%ENDIF%>
<%NEXTROW ENDQUERY%>

--F5gLoYNuko1moleVFdbwulSGh9aXAo3XvCDawtB
Content-Type: text/html; charset=$Shop.charset
Content-Transfer-Encoding: 8bit

<html>
<head>

<style type="text/css">
td { padding-right:10px;}
.right { text-align:right; }
</style>

</head>
<body>

<b>
    [%ORDER_RETURN_STATE_CHNG Din retur har ndrat status frn%]
    $old_state_name [%TO till%] $new_state_name
</b>

<p>$[P]mail_msg</p>

<p>$[P]return_response</p>

<hr noshade size="1"/>
<b>[%CUSTOMER_SERVICE Kundtjnst%]:</b><br/>
<table border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td rowspan="3">
			$[H]Shop.company<br/>
			$[H]Shop.address $[H]Shop.address2<br/>
			$[H]Shop.zip $[H]Shop.city<br/>
			<%MSG("COUNTRY_"+$Shop.ccode)%><br/>
		</td>
		<td class="right">[%TELEPHONE_SHORT Tel%]:</td>
		<td>$[H]Shop.service_phone</td>
	</tr>
	<tr>
		<td class="right">[%EMAIL E-post%]:</td>
		<td>$[H]Shop.service_email</td>
	</tr>
	<tr>
		<td class="right"><%IF $Shop.VATno THEN%>[%VAT_REG_NUMBER Regnr fr moms%]:<%ELSE%>&nbsp;<%ENDIF%></td>
		<td><%IF $Shop.VATno THEN%>$[H]Shop.VATno<br/><%ELSE%>&nbsp;<%ENDIF%></td>
	</tr>
</table>

</body>
</html>

--F5gLoYNuko1moleVFdbwulSGh9aXAo3XvCDawtB--
