private static Decimal Get1C77_quantity(this COMObject doc, IOrganization org) { switch (doc.GLOBAL.Connection.ConfigType) { case E1CConfigType.Uaservice: case E1CConfigType.PUB: case E1CConfigType.Buch: return((decimal)doc.GetPropertyDouble("Кво")); case E1CConfigType.Inforce: return((decimal)doc.GetPropertyDouble("Количество")); default: return(0); } }
private static Decimal Get1C77_SumWithoutVAT(this COMObject doc, IOrganization org) { switch (doc.GLOBAL.Connection.ConfigType) { case E1CConfigType.Uaservice: case E1CConfigType.PUB: case E1CConfigType.Buch: return((decimal)doc.GetPropertyDouble("СуммаБезНДС")); case E1CConfigType.Inforce: return((decimal)doc.GetPropertyDouble("Сумма")); default: return(0); } }
//public static bool CheckDoc(Object1C77 Doc, E1CConfigType ConfigType, IOrganization org) //{ // // check transacted // if (Doc.Method("IsTransacted") == 0) return false; // // check firm selected // if (ConfigType != E1CConfigType.Uaservice && ConfigType != E1CConfigType.Inforce) // { // Object1C77 firm = null; // try // { // firm = Doc.GetPropertyObject("Фирма"); // if (firm.GetPropertyString("Код").Trim() != org.Connections1C.FirmCode) // { // return false; // } // } // finally // { // if (firm != null) firm.Dispose(); // } // } // return true; //} private static double Get1C77_VAT(this COMObject doc, IOrganization org) { switch (doc.GLOBAL.Connection.ConfigType) { case E1CConfigType.Uaservice: case E1CConfigType.PUB: case E1CConfigType.Buch: return(doc.GetPropertyDouble("НДС")); case E1CConfigType.Inforce: return(doc.GetPropertyDouble("НДС")); default: return(0); } }