Package es.ipsa.atril.doc.user

Examples of es.ipsa.atril.doc.user.Dms


    return Gadgets.HTMLEncode(getString("es"));
  }
 
  public States states(AtrilSession oSes) throws IllegalStateException {
    States s = null;
    Dms oDms = oSes.getDms();
    if (null==sStates) {
      for (Document d : oDms.getDocument(id()).children()) {
        if (d.type().name().equals("States")) {
          s = new States(oDms.getDocument(d.id()));
          sStates = s.id();
          break;
        }
      }
    } else {
      s = new States(oDms.getDocument(sStates));   
    }
    return s;
  }
View Full Code Here


            oAacc.load(getSession(), sFormerId);
            oAacc.setCode(getParam("accountingAccount.code"));
            oAacc.setDescription(getParam("accountingAccount.description"));
            oAacc.setActive(getParam("accountingAccount.active","1").equals("1"));
        } else {
            Dms oDms = getSession().getDms();
            TaxPayer oTxpr = new TaxPayer(getSession().getDms(), getParam("taxPayer"));
            Document oDoca = oDms.newDocument(oDms.getDocumentType("AccountingAccount"), oTxpr.accounts(getSession()).getDocument());
            oDoca.save("");           
            oAacc = new AccountingAccount(oDoca);
            oAacc.setCode(getParam("accountingAccount.code"));
            oAacc.setDescription(getParam("accountingAccount.description"));
            oAacc.setActive(getParam("accountingAccount.active","1").equals("1"));
View Full Code Here

        return new ForwardResolution(FORM);
    }
   
    public Collection<Order> getOrders() throws StorageException, InstantiationException, IllegalStateException, IllegalStateException, IllegalAccessException  {
            connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
            Dms oDms = getSession().getDms();
            CustomerAccount oCacc = new CustomerAccount(oDms, getSessionAttribute("customer_account_docid"));
            return (Collection<Order>) oCacc.orders(getSession()).list(getSession());

    }
View Full Code Here

    public Resolution deleteOrder(){
       try {
      String order_id = getContext().getRequest().getParameter("order_id");
      connect();
      AtrilSession oSes = getSession();
      Dms oDms = oSes.getDms();
      Order oOrder = new Order(oDms, order_id);
      BigDecimal oStatus = oOrder.getBigDecimal("status_number");
      if (oStatus != null && (oStatus.compareTo(Tpv.PAGADO) != 0 && oStatus.compareTo(Tpv.PENDIENTE_CONFIRMACION) != 0)) {
        oOrder.getDocument().deleteWithChildren();
        oSes.commit();
View Full Code Here

      connect();

      Log.out.debug("Begin attaching sides");
     
      Dms oDms = getSession().getDms();
      Document rcpt = oDms.getDocument(sRecipient);
      String sTaxPayerId = rcpt.type().name().equals("TaxPayer") ? sRecipient : getSessionAttribute("taxpayer_docid");
      if (sService.equals("INVOICES")) {
        disconnect();
        DepositToZespedBridge oDzb = new DepositToZespedBridge(CaptureService.INVOICES, lDepositId, getSessionAttribute("user_uuid"), sFlavor, sTaxPayerId, sBiller, sRecipient);
        oDzb.start();
View Full Code Here

    if (sCaptureServiceFlavorId.length()==0) throw new NullPointerException("CaptureServiceFlavor.getCaptureServiceFlavor() CaptureService Flavor Id cannot be empty");
    CaptureServiceFlavor oSrvFlv;
    if (oServFlvrs==null) {
      oServFlvrs = new HashMap<String, CaptureServiceFlavor>();
      AtrilSession oSes = DAO.getAdminSession("CaptureServiceFlavors");
      Dms oDms = oSes.getDms();
      Zesped z = Zesped.top(oSes);
      for (Document d : z.getDocument().children()) {
        if (d.type().name().equals("CaptureServiceFlavor")) {
          oSrvFlv = new CaptureServiceFlavor(oDms.getDocument(d.id()));
          oServFlvrs.put(oSrvFlv.uid(), oSrvFlv);
        }
      }
      oSes.disconnect();
      oSes.close();
View Full Code Here

  public Attr[] attributes() {
    return aAttrs;
  }

  public void archive(AtrilSession oSes) {
    Dms oDms = oSes.getDms();
    if (!isNull("thread_id")) {
      if (getString("thread_id").length()>0) {
        SortableList<Document> oThd = oDms.query("Message$thread_id='"+getString("thread_id")+"'");
        if (!oThd.isEmpty()) {
          for (Document m : oThd) {
            Document oMsg = oDms.getDocument(m.id());
            oMsg.attribute("is_archived").set("1");
            oMsg.save("archive");
          }         
        }
      }
View Full Code Here

    if (sDocs.length()>0) {
      String[] aDocs = sDocs.split(",");
      try {
        Invoice oInv;
        connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
        Dms oDms = getSession().getDms();
        for (int d=0; d<aDocs.length; d++) {
          try {
            oInv = new Invoice(oDms, aDocs[d]);
            oInv.reject(getSession(), getSessionAttribute("user_uuid"), sCmmt);
              addDataLine("id",oInv.id());
View Full Code Here

public class ExistsDocument implements CustomConstraint {
  public boolean check (AtrilSession oSes, DocumentIndexer oIdx, BaseModelObject oObj) {
    boolean bFound;
    if (oObj.getStringNull("related_document","").length()>0) {
      try {
        Dms oDms = oSes.getDms();
        oDms.getDocument(oObj.getString("related_document"));
        bFound=true;
      } catch (ElementNotFoundException enfe) {
        bFound=false;
      }
    } else {
View Full Code Here

  private static VatComparator oVatCmp = new VatPercents().new VatComparator();
 
  public static Collection<VatPercent> listAll() {
    if (oAllPercents==null) {
      AtrilSession oSes = DAO.getAdminSession("VatPercents");
      Dms oDms = oSes.getDms();
      Document p = VatPercents.top(oSes).getDocument();
      oAllPercents = new ArrayList<VatPercent>();
      for (Document d : p.children()) {
        oAllPercents.add(new VatPercent(oDms.getDocument(d.id())));
      }
      oSes.disconnect();
      oSes.close();
      Collections.sort(oAllPercents, oVatCmp);
    }
View Full Code Here

TOP

Related Classes of es.ipsa.atril.doc.user.Dms

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.