@@ -23,7 +23,7 @@ | |||||
// default print style | // default print style | ||||
_p.def_print_style_body = "html, body, div, span, td { \ | _p.def_print_style_body = "html, body, div, span, td { \ | ||||
font-family: Arial, Helvetica; \ | font-family: Arial, Helvetica; \ | ||||
font-size: 10pt; \ | |||||
font-size: 9pt; \ | |||||
}\ | }\ | ||||
pre { margin:0; padding:0;}" | pre { margin:0; padding:0;}" | ||||
@@ -100,7 +100,7 @@ $.extend(_p, { | |||||
}, | }, | ||||
{ | { | ||||
cssFloat: 'right', | cssFloat: 'right', | ||||
marginBottom: '16px' | |||||
marginBottom: '16px' | |||||
}, ''); | }, ''); | ||||
// Delete previous print format select list and Reload print format list from current form | // Delete previous print format select list and Reload print format list from current form | ||||
@@ -53,14 +53,19 @@ $.extend(wn.meta, { | |||||
get_print_formats: function(doctype) { | get_print_formats: function(doctype) { | ||||
// if default print format is given, use it | // if default print format is given, use it | ||||
var print_format_list = []; | |||||
if(locals.DocType[doctype].default_print_format) | |||||
print_format_list.push(locals.DocType[doctype].default_print_format) | |||||
var print_format_list = [locals.DocType[doctype].default_print_format || "Standard"]; | |||||
$.each(wn.model.get("Print Format", {doc_type: doctype}), function(i, d) { | |||||
print_format_list.push("Standard"); | |||||
var print_formats = wn.model.get("Print Format", {doc_type: doctype}) | |||||
.sort(function(a, b) { return (a > b) ? 1 : -1; }); | |||||
$.each(print_formats, function(i, d) { | |||||
if(!in_list(print_format_list, d.name)) | if(!in_list(print_format_list, d.name)) | ||||
print_format_list.push(d.name); | print_format_list.push(d.name); | ||||
}); | }); | ||||
return print_format_list; | return print_format_list; | ||||
}, | }, | ||||
@@ -116,6 +116,8 @@ wn.print.Table = Class.extend({ | |||||
if(ci==0) { | if(ci==0) { | ||||
td.css({"min-width": "30px"}); | td.css({"min-width": "30px"}); | ||||
} else { | |||||
td.css({"min-width": "5%"}); | |||||
} | } | ||||
if(df && in_list(['Float', 'Currency'], df.fieldtype)) { | if(df && in_list(['Float', 'Currency'], df.fieldtype)) { | ||||
@@ -151,6 +153,8 @@ wn.print.Table = Class.extend({ | |||||
if(ci==0) { | if(ci==0) { | ||||
td.css({"min-width": "30px"}); | td.css({"min-width": "30px"}); | ||||
} else { | |||||
td.css({"min-width": "5%"}); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||