[loop list="[scratch ship_notice_order_number]"]
To: [scratch ship_notice_email]
Subject: Your order #[loop-code] [if-loop-data transactions status eq canceled]was canceled[else]has [if scratch ship_now_complete]completely shipped[elsif !scratch ship_notice_complete]partially shipped[/elsif][else]shipped[/else][/if][/else][/if-loop-data]
From: __COMPANY__ Customer Service <[either]__EMAIL_INFO__[or]__ORDERS_TO__[/either]>
Reply-to: [either]__EMAIL_SERVICE__[or]__EMAIL_INFO__[or]__ORDERS_TO__[/either]

Dear [loop-data transactions fname] [loop-data transactions lname],

[if scratch ship_now_complete]We have made the last shipment of your order #[loop-code], it is now complete!
[elsif scratch ship_notice_complete]Your order #[loop-code] has been [if-loop-data transactions status eq canceled]canceled. Please contact Customer Service for an explanation.[else]shipped![/else][/if-loop-data][/elsif]
[else]We have made a partial shipment of your order #[loop-code].[/else][/if]

            Name: [loop-data transactions fname] [loop-data transactions lname]
[if-loop-data transactions company]         Company: [loop-data transactions company][/if-loop-data]
   Email address: [loop-data transactions email]

         Address: [loop-data transactions address1][if-loop-data transactions address2]
                  [loop-data transactions address2][/if-loop-data]
City, State, Zip: [loop-data transactions city], [loop-data transactions state]  [loop-data transactions zip]
         Country: [loop-data transactions country]

  Payment Method: [loop-data transactions payment_method]
 Shipping Method: [shipping-desc [loop-data transactions shipmode]]

   Daytime Phone: [loop-data transactions phone_day]
   Evening Phone: [loop-data transactions phone_night]

[if-loop-data transactions b_address1]
    Billing Name: [loop-data transactions b_fname] [loop-data transactions b_lname]
 Billing Address: [loop-data transactions b_address1] [loop-data transactions b_address2]
City, State, Zip: [loop-data transactions b_city], [loop-data transactions b_state] [loop-data transactions b_zip]
 Billing Country: [value b_country]
[/if-loop-data]

Qty   Item No.    Description                            Price       Extension
---- ----------- ------------------------------- -------------- ---------------- 
[loop prefix=item search="
		fi=orderline
		st=db
		sf=order_number
		se=[loop-code]
		co=1
		op=eq
		ml=1000
	"][row 82]
[column width=5 gutter=1 align=right]  [item-data orderline quantity] [/column]
[column width=12 gutter=1]  [item-data orderline sku] [/column]
[column width=32 gutter=1 align=left wrap=1][item-data orderline description]
[if-item-data transactions size]SIZE-->[item-item-data transactions size][/if-item-data][if-item-data transactions color] COLOR-->[item-item-data transactions color][/if-item-data]
[/column]
[column width=15 gutter=1 align=r][currency][item-data orderline price][/currency][/column]
[column width=16 gutter=0 align=r][currency][item-data orderline subtotal][/currency][/column]
[/row]
[row 82]
[column width=5 gutter=1 align=right][/column]
[column width=12 gutter=1][/column]
[column width=60 gutter=1 align=left wrap=1][calc]
	my $status = q{[display
						table=orderline
						column=status
						key="[item-code]"
						arbitrary=order_view
						]};
	$status =~ s:<.*>::s;
	if($status !~ /\S/i) {
		$status = q{[item-data orderline status]};
	}
	$status = uc $status;
	my $mesg = q{[data
					table=inventory
					column=stock_message
					key="[item-data orderline sku]"
					]};
	if(! $mesg and $status !~ /^\s*shipped\b/i) {
		$status .= " ($mesg)";
	}
	$status .= q{ time: [convert-date][item-data orderline update_date][/convert-date]};
	return $status;
[/calc]
[/column]
[/row]

[/loop]
[row 82]
[column width=5 align=right][/column]
[column width=12 gutter=1][/column]
[column width=32 align=R wrap=1 gutter=1][/column]
[column width=15 gutter=1]SUBTOTAL[/column]
[column width=16 align=right gutter=0][currency][loop-data transactions subtotal][/currency][/column]
[/row]
[row 82]
[column width=5 align=right][/column]
[column width=12 gutter=1][/column]
[column width=32 align=R wrap=1 gutter=1][/column]
[column width=15 gutter=1]SALES TAX[/column]
[column width=16 align=right gutter=0][currency][loop-data transactions salestax][/currency][/column]
[/row]
[row 82]
[column width=5 align=right][/column]
[column width=12 gutter=1][/column]
[column width=32 align=R wrap=1 gutter=1][/column]
[column width=15 gutter=1]SHIPPING[/column]
[column width=16 align=right gutter=0][currency][loop-data transactions shipping][/currency][/column]
[/row]

[row 82]
[column width=5 align=right][/column]
[column width=12 gutter=1][/column]
[column width=32 align=R wrap=1 gutter=1][/column]
[column width=15 gutter=1]ORDER TOTAL[/column]
[column width=16 align = right gutter=0][currency][either][loop-data transactions pay_cert_ord_total][or][loop-data transactions total_cost][/either][/currency][/column]
[/row][if-loop-data transactions pay_cert_total]
[row 82]
    [column width=5 align=right][/column]
    [column width=12 gutter=1][/column]
    [column width=32 align=R wrap=1 gutter=1][/column]
    [column width=15 gutter=1]GIFT CERT[/column]
    [column width=16 align=right gutter=0][currency][loop-data transactions pay_cert_total][/currency][/column]
[/row]
[row 82]
    [column width=5 align=right][/column]
    [column width=12 gutter=1][/column]
    [column width=32 align=R wrap=1 gutter=1][/column]
    [column width=15 gutter=1]CHARGED[/column]
    [column width=16 align=right gutter=0][currency][loop-data transactions total_cost][/currency][/column]
[/row]
[/if-loop-data]
[if-loop-data transactions comments]
Your comments or gift note
----------------------------
[loop-data transactions comments]
[/if-loop-data]
  
Should you have a question about your items, or about other __COMPANY__
products, please reply to this message and let us help.

Remember, you can always visit our site at:

    __SERVER_NAME__

Regards and thanks for your business!

__COMPANY__
__ADDRESS__
__CITY__
__PHONE__
__TOLLFREE__
FAX: __FAX__
[/loop]
