03-18-2013 08:29 AM
<action id="sm.doclib.action.detail.sending.e-invoices"
icon="detailed-view-on"
type="pagelink"
label="actions.document.detail.sending.e-invoice">
<param name="page">/components/emfra/detailSendingeInvoice?nodeId={node.nodeRef}</param>
<evaluator>evaluator.doclib.metadata.factura.emitida</evaluator>
</action>
<webscript>
<shortname>Detalle facturas emitidas</shortname>
<description>Muestra el detalle de los envíos de las facturas emitidas</description>
<url>/components/emfra/detailSendingeInvoice?nodeId={nodeId}</url>
</webscript>
03-19-2013 06:30 AM
03-20-2013 04:56 AM
<webscript>
<shortname>EmFra Detail</shortname>
<description>Retrieve detail of sendings from node id</description>
<url>/emfra/emfradetail?nodeId={nodeId}</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction>required</transaction>
</webscript>
{
"fradetail" : [
"numFra" : "${numFra}",
"docId" : "${docId}",
"fechafra" : "${fechafra}"
]
"emfradetail" : [
<#list detalle as detail>
{
"user" : "${detail.user}"
"enviado" : "${detail.enviadoString}",
<#if detail.enviado>
"fechaEnviado" : "${detail.fechaEnviado}" ,
</#if>
"email" : "${detail.email}",
"descargada" : "${detail.descargadaString}",
<#if detail.descargada>
"fechaDescargada" : "${detail.fechaDescargada}"
</#if>
}
</#list>
]
}
<action id="sm.doclib.action.detail.sending.e-invoices"
icon="detailed-view-on"
type="pagelink"
label="actions.document.detail.sending.e-invoice">
<param name="page">/components/emfra/detailSendingeInvoice?nodeRef={node.nodeRef}</param>
<evaluator>evaluator.doclib.metadata.invoice.sent</evaluator>
</action>
<actionGroup id="document-browse">
<action index="121" id="sm.doclib.action.detail.sending.e-invoices" label-id="actions.document.detail.sending.e-invoice"/>
</actionGroup>
<webscript>
<shortname>eInvoice detail</shortname>
<url>/site/{site}/components/emfra/detailSendingeInvoice?nodeRef={nodeRef}</url>
</webscript>
<import resource="classpath:/alfresco/templates/org/alfresco/import/emfra-util.js">
function main()
{
EmfraUtil.param('nodeRef');
var detail = EmfraUtil.getSendingeInvoiceDetail(model.nodeRef);
if (detail)
{
model.fradetail = detail["fradetail"];
model.emfradetail = detail["emfradetail"];
}
}
main();
<import resource="classpath:/alfresco/site-webscripts/org/alfresco/components/documentlibrary/data/surf-doclist.lib.js">
var this_EmfraUtil = this;
var EmfraUtil =
{
getSendingeInvoiceDetail: function getSendingeInvoiceDetail(nodeRef){
if (nodeRef){
var url = '/emfra/emfradetail?nodeId=' + nodeRef;
}
var result = remote.connect("alfresco").get(url);
if (result.status == 200){
var details = eval('(' + result + ')');
if (details && (details.item || details.items)){
return details;
}
}
return result.status;
},
param: function param(name, defaultValue)
{
var value;
if (args[name] && args[name].length != 0)
{
value = args[name];
}
else if (this_EmfraUtil.hasOwnProperty("page") && page.url.args[name] && page.url.args[name].length != 0)
{
value = page.url.args[name];
}
else if (this_EmfraUtil.hasOwnProperty("page") && page.url.templateArgs[name] && page.url.templateArgs[name].length != 0)
{
value = page.url.templateArgs[name];
}
else if (this_EmfraUtil.hasOwnProperty("template") && template.properties[name] && template.properties[name].length != 0)
{
value = template.properties[name];
}
else if (arguments.length > 1)
{
value = defaultValue;
}
else
{
EmfraUtil.error(400, 'Parameter "' + name+ '" is missing.', true);
}
model[name] = value;
return value;
},
error: function error(code, message, redirect)
{
status.code = arguments.length > 0 ? 500 : code;
status.message = message || 'An error occured';
status.redirect = arguments.length > 2 ? redirect : true;
throw new Error(message);
},
}
03-20-2013 08:12 AM
<import resource="classpath:/alfresco/templates/org/alfresco/import/veritas-util.js">
function main()
{
var detail = VeritasUtil.getSendingeInvoiceDetail(model.nodeRef);
if (detail)
{
model.fradetail = detail["fradetail"];
model.emfradetail = detail["emfradetail"];
}
}
main();
03-21-2013 03:47 AM
03-21-2013 12:26 PM
03-21-2013 03:43 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.